networkqit.algorithms.basinhoppingmod.Metropolis

class Metropolis(T, random_state=None)[source]

Metropolis acceptance criterion

Tfloat

The “temperature” parameter for the accept or reject criterion.

random_stateNone or np.random.RandomState object

Random number generator used for acceptance test

__init__(T, random_state=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(T[, random_state])

Initialize self.

accept_reject(energy_new, energy_old)

If new energy is lower than old, it will always be accepted.