openjij
Framework for the Ising model and QUBO.
|
Abstract graph class. More...
#include <graph.hpp>
Public Member Functions | |
Graph (std::size_t num_spins) | |
Graph constructor. | |
template<typename RandomNumberEngine > | |
const Spins | gen_spin (RandomNumberEngine &random_numder_engine) const |
generate spins randomly. | |
template<typename RandomNumberEngine > | |
const Binaries | gen_binary (RandomNumberEngine &random_numder_engine) const |
generate spins randomly. | |
std::size_t | get_num_spins () const noexcept |
get number of spins | |
std::size_t | size () const noexcept |
get number of spins | |
Private Attributes | |
const std::size_t | _num_spins |
total number of spins | |
Abstract graph class.
|
inlineexplicit |
Graph constructor.
num_spins | total number of spins |
|
inline |
generate spins randomly.
References _num_spins, and openjij::graph::json_parse().
Referenced by openjij::declare_Graph().
|
inline |
generate spins randomly.
References _num_spins, and openjij::graph::json_parse().
Referenced by openjij::declare_Graph().
|
inlinenoexcept |
get number of spins
References _num_spins.
Referenced by openjij::system::ClassicalIsing< graph::CSRSparse< FloatType > >::ClassicalIsing(), openjij::system::ClassicalIsing< graph::Dense< FloatType > >::ClassicalIsing(), openjij::system::ClassicalIsing< graph::Sparse< FloatType > >::ClassicalIsing(), openjij::system::ContinuousTimeIsing< graph::Sparse< FloatType > >::ContinuousTimeIsing(), openjij::system::ContinuousTimeIsing< graph::CSRSparse< FloatType > >::ContinuousTimeIsing(), openjij::graph::CSRSparse< FloatType >::energy(), openjij::graph::Dense< FloatType >::energy(), openjij::graph::Sparse< FloatType >::energy(), openjij::graph::CSRSparse< FloatType >::energy(), openjij::graph::Dense< FloatType >::energy(), openjij::graph::Sparse< FloatType >::energy(), openjij::utility::gen_matrix_from_graph(), openjij::utility::gen_matrix_from_graph(), openjij::graph::Dense< FloatType >::h(), openjij::graph::Sparse< FloatType >::h(), openjij::graph::Dense< FloatType >::h(), openjij::graph::Sparse< FloatType >::h(), openjij::graph::Dense< FloatType >::J(), openjij::graph::Sparse< FloatType >::J(), openjij::graph::Dense< FloatType >::J(), openjij::graph::Sparse< FloatType >::J(), openjij::graph::Sparse< FloatType >::set_adj_node(), openjij::graph::Dense< FloatType >::set_interaction_matrix(), openjij::graph::Square< FloatType >::to_rc(), and openjij::graph::Chimera< FloatType >::to_rci().
|
inlinenoexcept |
get number of spins
References _num_spins.
Referenced by openjij::graph::Polynomial< FloatType >::CheckKeyValid(), openjij::declare_Graph(), and openjij::graph::Polynomial< FloatType >::energy().
|
private |
total number of spins
Referenced by gen_binary(), gen_spin(), get_num_spins(), and size().