Commit 952d299b authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Improve docstrings

parent 1475dc43
......@@ -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 groups, and :math:`N` is the number of vertices.
number of blocks, 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 groups after shrink: %d (should be %d)" % (nB, B)
assert nB == B, "wrong number of blocks after shrink: %d (should be %d)" % (nB, B)
return state
def collect_edge_marginals(self, p=None, update=1.):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment