Class model::IsingCompact
Ising model which use GraphCompactModel as model base.
Inherited Members
Methods
get_identifier()
Returns the identifier string of the model type (e.g., "ising").
Declaration
std::string model::IsingCompact<Element_T>::get_identifier() const override
get_version()
Returns the version of the input format this implementation expects.
Declaration
std::string model::IsingCompact<Element_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::IsingCompact<Element_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::IsingCompact<Element_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::IsingCompact<Element_T>::calculate_cost_difference(const IsingCompactState&state, const size_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
IsingCompactState model::IsingCompact<Element_T>::get_random_state(utils::RandomGenerator&rng) const override
get_initial_configuration_state()
Declaration
IsingCompactState model::IsingCompact<Element_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
size_t model::IsingCompact<Element_T>::get_random_transition(const IsingCompactState&, utils::RandomGenerator&rng) const override
apply_transition()
Flip the spin specified by spin_id.
Declaration
void model::IsingCompact<Element_T>::apply_transition(const size_t&spin_id, IsingCompactState&state) const override
configure()
Serialize metadata and the underlying graph.
The underlying graph represents the "disorder" of the Ising model (glass) we are simulating.
Declaration
void model::IsingCompact<Element_T>::configure(const utils::Json&json) override
configure()
Declaration
void model::IsingCompact<Element_T>::configure(typename GraphCompact::Configuration_T&configuration)
render_state()
Declaration
utils::Structure model::IsingCompact<Element_T>::render_state(const IsingCompactState&state) const override
state_memory_estimate()
Declaration
size_t model::IsingCompact<Element_T>::state_memory_estimate() const override
state_only_memory_estimate()
Declaration
size_t model::IsingCompact<Element_T>::state_only_memory_estimate() const override
estimate_min_cost_diff()
Declaration
double model::IsingCompact<Element_T>::estimate_min_cost_diff() const override
estimate_max_cost_diff()
Declaration
double model::IsingCompact<Element_T>::estimate_max_cost_diff() const override
get_term()
Declaration
double model::IsingCompact<Element_T>::get_term(const State_T&state, size_t term_id) const