Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
src/graph_tool/inference/blockmodel.py
src/graph_tool/inference/blockmodel.py
+18
-2
No files found.
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
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