气泡格式周围的工具
bubbletools的Python项目详细描述
#bubble tools
与bubble格式相关的python例程,可在cli或库中使用。
>pip安装bubbletools
-[x]bubbbble to python
-[x]bubble to[gexf]bubble to[gexf](https://gephi.org/gexf/format/)
-[]bubble to cycloscape.js
>-[x]工作实现
-[x]工作实现
-[x x]>-[x]工作实现
-[x]测试完全有效bubble
-[]单元测试
-[]大型图测试,用于基准测试(可能不会缩放)
-[]bubble-to-dot(通过[graphviz](http://graphviz.readthedocs.io/en/latest/))
-[x]工作实现
-[x]完全有效bubble测试
-[]单元测试
-[]大型图测试,对于基准测试(可能不会扩展)
-[]python-to bubble
-[]dot-to python
-[]对bubble-描述团的单元测试
以及给定bubble文件中的不一致性
spot powernode overlapping,includes不一致性
,以及空的或单点的powernode。
profiling提供有关文件数据的一般信息。
点格式的气泡文件。
保存后可以使用可选的“--render”标志来显示图形。
gexf格式也有相同的api。
cytoscape.js来呈现图形。
可选的“--render”标志可用于在生成的网站上运行默认的Web浏览器。
有关用法示例,请参见makefile recipe`js'。
网站是文件(css、js、html)的集合,其中只有一个(`js/graph.js`)
根据输入数据而改变。
不是每次都是完整的网站。
有关用法示例,请参阅makefile recipe“js per file”。
python api
子模块“validator”和“converter”为cli提供上述功能:
从bubbletools import validate,convert
用于登录验证(open('path/to/bubble.lp'),profiling=true):
print(log)
convert.to_dot(open('path/to/bubble.lp'),dotfile='path/to/dot.dot')
python图形表示法
低级接口是“bubbletree”对象,允许用户将气泡数据所描绘的图形作为python对象进行操作。
请参见[单元测试](bubbletools/test/test-bbltree.py)例如“bubble tree”的用法。
from bubbletools import bubbletree
tree=bubbletree.from bubble_file('path/to/bubble.lp')
打印(tree.edges,tree.inclusions,tree.roots)
“edges”是一个映射“precedent->;继承者集”,
“includes”是一个映射“power”节点->;直接包含的(power)节点集,
和“根”是一组不包含任何内容的(幂)节点。
subroots=bubbletree.connected_components()
,其中“cc”和“subroots”都是映射,分别将连接组件的*根与连接组件的所有节点连接起来,
和*连接组件的*根与同一连接组件的其他根连接起来。
因此,连接组件由一个它们的根,这是关键选项。
\正在检索powernodes上的数据:
tree=bubbletree.from懔bubble懔file('bubbles/basic.bbl')
for pnode in tree.powernodes:
data=tree.powernode懔data(pnode)
print(
“{}包含节点{{{{}}}},powernodes{}}}}。”
“。格式(pnode,data.contained懔节点,数据。包含的代码)
)
与bubble格式相关的python例程,可在cli或库中使用。
>pip安装bubbletools
-[x]bubbbble to python
-[x]bubble to[gexf]bubble to[gexf](https://gephi.org/gexf/format/)
-[]bubble to cycloscape.js
>-[x]工作实现
-[x]工作实现
-[x x]>-[x]工作实现
-[x]测试完全有效bubble
-[]单元测试
-[]大型图测试,用于基准测试(可能不会缩放)
-[]bubble-to-dot(通过[graphviz](http://graphviz.readthedocs.io/en/latest/))
-[x]工作实现
-[x]完全有效bubble测试
-[]单元测试
-[]大型图测试,对于基准测试(可能不会扩展)
-[]python-to bubble
-[]dot-to python
-[]对bubble-描述团的单元测试
以及给定bubble文件中的不一致性
spot powernode overlapping,includes不一致性
,以及空的或单点的powernode。
profiling提供有关文件数据的一般信息。
点格式的气泡文件。
保存后可以使用可选的“--render”标志来显示图形。
gexf格式也有相同的api。
cytoscape.js来呈现图形。
可选的“--render”标志可用于在生成的网站上运行默认的Web浏览器。
有关用法示例,请参见makefile recipe`js'。
网站是文件(css、js、html)的集合,其中只有一个(`js/graph.js`)
根据输入数据而改变。
不是每次都是完整的网站。
有关用法示例,请参阅makefile recipe“js per file”。
python api
子模块“validator”和“converter”为cli提供上述功能:
从bubbletools import validate,convert
用于登录验证(open('path/to/bubble.lp'),profiling=true):
print(log)
convert.to_dot(open('path/to/bubble.lp'),dotfile='path/to/dot.dot')
python图形表示法
低级接口是“bubbletree”对象,允许用户将气泡数据所描绘的图形作为python对象进行操作。
请参见[单元测试](bubbletools/test/test-bbltree.py)例如“bubble tree”的用法。
from bubbletools import bubbletree
tree=bubbletree.from bubble_file('path/to/bubble.lp')
打印(tree.edges,tree.inclusions,tree.roots)
“edges”是一个映射“precedent->;继承者集”,
“includes”是一个映射“power”节点->;直接包含的(power)节点集,
和“根”是一组不包含任何内容的(幂)节点。
subroots=bubbletree.connected_components()
,其中“cc”和“subroots”都是映射,分别将连接组件的*根与连接组件的所有节点连接起来,
和*连接组件的*根与同一连接组件的其他根连接起来。
因此,连接组件由一个它们的根,这是关键选项。
\正在检索powernodes上的数据:
tree=bubbletree.from懔bubble懔file('bubbles/basic.bbl')
for pnode in tree.powernodes:
data=tree.powernode懔data(pnode)
print(
“{}包含节点{{{{}}}},powernodes{}}}}。”
“。格式(pnode,data.contained懔节点,数据。包含的代码)
)