Class model::AbstractIsing
Ising Model.
Inherited Members
Methods
get_identifier()
Returns the identifier string of the model type (e.g., "ising").
Declaration
std::string model::AbstractIsing<State_T, Cost_T>::get_identifier() const override
get_version()
Returns the version of the input format this implementation expects.
Declaration
std::string model::AbstractIsing<State_T, Cost_T>::get_version() const override
match_version()
Checks the string argument against the expected version.
This can be overloaded to accept other version than the one returned by get_version()
.
Declaration
void model::AbstractIsing<State_T, Cost_T>::match_version(const std::string&version) override
calculate_cost()
Cost function:
\mathcal{H} = -\sum_{j\in\mathrm{\{edges\}}} c_j\prod_{i\in j}s_i
Declaration
double model::AbstractIsing<State_T, Cost_T>::calculate_cost(const State_T&state) const override
calculate_cost_difference()
Cost difference:
\Delta_{i\to i'} = 2 \sum_{j\in e_i} c_j\prod_{i\in j}s_i
Declaration
double model::AbstractIsing<State_T, Cost_T>::calculate_cost_difference(const State_T&state, const Transition_T&spin_id) const override
get_random_state()
Return a random Ising state.
The number of Ising variables (terms) is determined from the number of nodes (edges) in the underlying graph.
Declaration
State_T model::AbstractIsing<State_T, Cost_T>::get_random_state(utils::RandomGenerator&rng) const override
get_initial_configuration_state()
Declaration
State_T model::AbstractIsing<State_T, Cost_T>::get_initial_configuration_state() const override
get_random_transition()
Return a random Single spin update.
We represent a single spin update as merely the index of the spin variable that will flip.
Declaration
Transition_T model::AbstractIsing<State_T, Cost_T>::get_random_transition(const State_T&, utils::RandomGenerator&rng) const override
apply_transition()
Flip the spin specified by spin_id.
Declaration
void model::AbstractIsing<State_T, Cost_T>::apply_transition(const Transition_T&spin_id, State_T&state) const override=0
configure()
Serialize metadata and the underlying graph.
The underlying graph represents the "disorder" of the Ising model (glass) we are simulating.
Declaration
void model::AbstractIsing<State_T, Cost_T>::configure(const utils::Json&json) override
configure()
Declaration
void model::AbstractIsing<State_T, Cost_T>::configure(typename Graph::Configuration_T&configuration)
render_state()
Render a state of this model.
Default implementation of how a state of this model is rendered (by' invoking the state's proper rendering mechanic). Overloading this method allows a model implementation to customize how a state is printed. This is relevant if the rendering needs to depend on model parameters in addition to the state.
Declaration
utils::Structure model::AbstractIsing<State_T, Cost_T>::render_state(const State_T&state) const override
state_memory_estimate()
Declaration
size_t model::AbstractIsing<State_T, Cost_T>::state_memory_estimate() const override
state_only_memory_estimate()
Declaration
size_t model::AbstractIsing<State_T, Cost_T>::state_only_memory_estimate() const override
estimate_max_cost_diff()
Declaration
double model::AbstractIsing<State_T, Cost_T>::estimate_max_cost_diff() const override
estimate_min_cost_diff()
Declaration
double model::AbstractIsing<State_T, Cost_T>::estimate_min_cost_diff() const override
get_term()
Calculate the term with id term_id
.
Declaration
virtual double model::AbstractIsing<State_T, Cost_T>::get_term(const State_T&state, size_t term_id) const =0