测试版ADIC和自动工具

badic的Python项目详细描述


sagemath的badic包添加了与beta adic集相关的功能,即表单集 {a 0+au 1*b+a 2*b^2+…+au n*b^n n,au 0 au 1…a u n in l} 其中b是一个数字,l是一种常规语言(与b在同一个环中的字母表上)。 这允许用粗糙分形和许多其他分形进行计算和绘图。 它还允许有效地操作用C语言编写的自动机(主要是确定性自动机)。 它安装在现有SAGE安装的顶部(在版本8.1和8.8上测试)。

这个包基于SageMath

先决条件

安装badic包需要一个工作sage安装(使用cython和gcc)。

建议(但不必要)安装graphiz的dot命令,以便 有很好的自动绘图。 如果要使用betaadicset的函数draw_zoom()和user_draw(),则需要 在安装badic包之前,请在系统中安装sdl2库(开发版本)。

安装

模块分布在pypi上。您只需运行以下命令:

$ sage -pip install badic [--user]

–user选项是可选的,允许在用户空间中安装模块 (不需要管理员权限)。

备注:如果您没有安装ssl,则前面的命令可能不起作用。 如果是这样,您可以从https://pypi.org/project/badic/#files下载文件badic-x.x.x.tar.gz 然后,提取文件(您将得到一个badic-x.x.x文件夹),然后使用命令

$ sage -pip install badic-x.x.x/ –user

(按提取的文件夹位置替换badic-x.x.x/)

文档

检查

安装badic后,通过启动sage检查它是否工作 并键入以下命令。你应该也一样 输出如下。

sage: from badic import *
sage: m = BetaAdicSet(1/(1+I), [0,1])
sage: m.plot()                  # this should plot the dragon fractal

sage: mi = m.intersection_words([0], [1]); mi
b-adic set with b root of x^2 - x + 1/2, and an automaton of 21 states and 2 letters
sage: mi.plot(nprec=8)          # this should plot a part of the boundary of the dragon fractal
sage: mi.critical_exponent()    # compute the Hausdorff dimension of the boundary of the dragon fractal
log(y)/log(1.414213562373095?) where y is the max root of x^3 - x^2 - 2, and 1.414213562373095? is root of x^2 - 2.
1.523627086202492

sage: from badic.beta_adic import *
sage: s = WordMorphism('a->ab,b->ca,c->a')  # define a substitution
sage: m = DumontThomas(s).mirror(); m    # take the corresponding beta-adic set
b-adic set with b root of x^3 - x^2 - x - 1, and an automaton of 3 states and 2 letters
sage: m.plot()      # should plot the Rauzy fractal of the substitution s
sage: m.draw_zoom() # permits to zoom in the Rauzy fractal (works only if SDL2 was installed)

sage: a = dag.AnyWord(['a','b']).concat(dag.Word('abca')); a    # define an automaton
DetAutomaton with 5 states and an alphabet of 3 letters
sage: a.plot()  # plot the automaton (to have a nice picture drawn with Graphviz,
                #                      install the dot command on your system before
                #                      installing the package badic)

正在安装开发版本。源代码

开发网页是https://gitlab.com/mercatp/badic

假设您的计算机上有git程序,则可以安装 具有以下命令的开发版本:

$ sage -pip install git+https://gitlab.com/mercatp/badic [--user]

联系人

欢迎您的评论和帮助:paul.mercat@univ-amu.fr

作者

  • 保罗梅尔卡特
  • 多米尼克·贝尼利(PEP8和DOC)
  • Vincent Delecroix(帮助制作包装)

版本

  • badic 0.0.4于2019-07-26发布(作为pypi上的python包)
  • badic 0.0.3于2019-07-26发布(作为pypi上的python包)
  • badic 0.0.2于2019-07-26发布(作为pypi上的python包)
  • badic 0.0.1于2019-07-26发布(作为pypi上的python包)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java FloatingAction按钮与RecyclerView中的CardView重叠   java如何计算CardLayout中的卡数   从远程系统上传MySQL数据库并访问Java应用程序   java调用堆栈如何处理带或不带返回类型的递归?   Springboot中的java组计数聚集   java如何在javafx textarea中使用richtextfx   获取与Mockito相关的错误时出现Java问题   java如何将JaxRS响应转换为Wiremock响应   Hadoop集群java。net ConnectionException:连接被拒绝错误   java如何加载文件私有文件类型是pem   java在元空间中的提升和加载的类   如何将系统属性传递给从HTML启动的Java小程序   java如何从网页中获取值并在主类中使用它?安卓应用   java在春天,advisor和aspect之间有什么区别?   java如何检测文件是否已重命名?   java消息驱动Bean何时使用