MulticanonicalState#

class graph_tool.inference.MulticanonicalState(state, S_min, S_max, nbins=1000)[source]#

Bases: object

The density of states of a multicanonical Monte Carlo algorithm. It is used by graph_tool.inference.multicanonical_equilibrate().

Parameters:
state

Block state to be used.

S_minfloat

Minimum energy.

S_maxfloat

Maximum energy.

nbinsint (optional, default: 1000)

Number of bins.

Methods

 Get allowed energy bounds. Get density of states, normalized so that total sum is $$B^N$$, where $$B$$ is the number of groups, and $$N$$ is the number of nodes. Get energy bounds. get_entropy(S[, B]) get_flatness([h, allow_gaps]) Get energy histogram flatness. Get energy histogram. Get permanent energy histogram. Get posterior probability. Get energy range. Reset energy histogram. sweep(**kwargs)
get_allowed_energies()[source]#

Get allowed energy bounds.

get_bin(S)[source]#
get_density(B=None)[source]#

Get density of states, normalized so that total sum is $$B^N$$, where $$B$$ is the number of groups, and $$N$$ is the number of nodes. If not supplied $$B=N$$ is assumed.

get_energies()[source]#

Get energy bounds.

get_entropy(S, B=None)[source]#
get_flatness(h=None, allow_gaps=True)[source]#

Get energy histogram flatness.

get_hist()[source]#

Get energy histogram.

get_perm_hist()[source]#

Get permanent energy histogram.

get_posterior(N=None)[source]#

Get posterior probability.

get_range()[source]#

Get energy range.

reset_hist()[source]#

Reset energy histogram.

sweep(**kwargs)[source]#