Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tiago Peixoto
graph-tool
Commits
892a658d
Commit
892a658d
authored
Oct 20, 2013
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simple documentation fixes
parent
e2ef6e01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
13 deletions
+8
-13
doc/graph_tool.rst
doc/graph_tool.rst
+2
-5
src/graph_tool/community/nested_blockmodel.py
src/graph_tool/community/nested_blockmodel.py
+6
-8
No files found.
doc/graph_tool.rst
View file @
892a658d
...
...
@@ -50,7 +50,7 @@
.. automethod:: set_fast_edge_removal
.. automethod:: get_fast_edge_removal
The following functions allow for easy removal of vertices
of
The following functions allow for easy removal of vertices
and
edges from the graph.
.. automethod:: clear
...
...
@@ -169,15 +169,12 @@
.. autoclass:: GraphView
:show-inheritance:
:members:
.. autoclass:: Vertex
:members:
.. autoclass:: Edge
:members:
.. autoclass:: PropertyMap
:members:
.. autoclass:: PropertyArray
:show-inheritance:
:no-members:
:members: prop_map
.. autofunction:: load_graph
.. autofunction:: group_vector_property
...
...
src/graph_tool/community/nested_blockmodel.py
View file @
892a658d
...
...
@@ -1013,27 +1013,25 @@ def minimize_nested_blockmodel_dl(g, Bs=None, bs=None, deg_corr=True,
.. doctest:: nested_mdl
>>> g = gt.collection.data["netscience"]
>>> g = gt.GraphView(g, vfilt=gt.label_largest_component(g))
>>> g.purge_vertices()
>>> bstack, mdl = gt.minimize_nested_blockmodel_dl(g)
>>> g = gt.collection.data["power"]
>>> bstack, mdl = gt.minimize_nested_blockmodel_dl(g, deg_corr=True)
>>> t = gt.get_hierarchy_tree(bstack)[0]
>>> tpos = pos = gt.radial_tree_layout(t, t.vertex(t.num_vertices() - 1), weighted=True)
>>> cts = gt.get_hierarchy_control_points(g, t, tpos)
>>> pos = g.own_property(tpos)
>>> b = bstack[0].vp["b"]
>>> gt.graph_draw(g, pos=pos, vertex_fill_color=b, vertex_shape=b, edge_control_points=cts,
... edge_color=[0, 0, 0, 0.3], vertex_anchor=0, output="
netscience
_nested_mdl.pdf")
... edge_color=[0, 0, 0, 0.3], vertex_anchor=0, output="
power
_nested_mdl.pdf")
<...>
.. testcleanup:: nested_mdl
gt.graph_draw(g, pos=pos, vertex_fill_color=b, vertex_shape=b, edge_control_points=cts, edge_color=[0, 0, 0, 0.3], vertex_anchor=0, output="
netscience
_nested_mdl.png")
gt.graph_draw(g, pos=pos, vertex_fill_color=b, vertex_shape=b, edge_control_points=cts, edge_color=[0, 0, 0, 0.3], vertex_anchor=0, output="
power
_nested_mdl.png")
.. figure::
netscience
_nested_mdl.*
.. figure::
power
_nested_mdl.*
:align: center
Block partition of a
co-authorship
network, which minimizes the description
Block partition of a
power-grid
network, which minimizes the description
length of the network according to the nested (degree-corrected) stochastic blockmodel.
References
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment