Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
952d299b
Commit
952d299b
authored
Apr 13, 2016
by
Tiago Peixoto
Browse files
Improve docstrings
parent
1475dc43
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/inference/blockmodel.py
View file @
952d299b
...
...
@@ -815,6 +815,11 @@ class BlockState(object):
nmoves : ``int``
Number of vertices moved.
Notes
-----
This algorithm has an :math:`O(E)` complexity, where :math:`E` is the
number of edges (independent of the number of blocks).
References
----------
.. [peixoto-efficient-2014] Tiago P. Peixoto, "Efficient Monte Carlo and
...
...
@@ -917,6 +922,12 @@ class BlockState(object):
Entropy difference after the sweeps.
nmoves : ``int``
Number of vertices moved.
Notes
-----
This algorithm has an :math:`O(E\times B)` complexity, where :math:`B`
is the number of blocks, and :math:`E` is the number of edges.
"""
gibbs_state
=
DictState
(
locals
())
...
...
@@ -1008,6 +1019,11 @@ class BlockState(object):
nmoves : ``int``
Number of vertices moved.
Notes
-----
This algorithm has an :math:`O(E)` complexity, where :math:`E` is the
number of edges (independent of the number of blocks).
References
----------
.. [wang-efficient-2001] Fugao Wang, D. P. Landau, "An efficient, multiple
...
...
@@ -1136,7 +1152,7 @@ class BlockState(object):
-----
This algorithm has an :math:`O(B^N)` complexity, where :math:`B` is the
number of
group
s, and :math:`N` is the number of vertices.
number of
block
s, and :math:`N` is the number of vertices.
"""
...
...
@@ -1286,7 +1302,7 @@ class BlockState(object):
state
=
self
.
copy
(
b
=
b
)
if
_bm_test
():
nB
=
(
state
.
wr
.
a
>
0
).
sum
()
assert
nB
==
B
,
"wrong number of
group
s after shrink: %d (should be %d)"
%
(
nB
,
B
)
assert
nB
==
B
,
"wrong number of
block
s after shrink: %d (should be %d)"
%
(
nB
,
B
)
return
state
def
collect_edge_marginals
(
self
,
p
=
None
,
update
=
1.
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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