openjij
Framework for the Ising model and QUBO.
Loading...
Searching...
No Matches
openjij::graph::Graph Class Reference

Abstract graph class. More...

#include <graph.hpp>

Inheritance diagram for openjij::graph::Graph:

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

Detailed Description

Abstract graph class.

Constructor & Destructor Documentation

◆ Graph()

openjij::graph::Graph::Graph ( std::size_t num_spins)
inlineexplicit

Member Function Documentation

◆ gen_binary()

template<typename RandomNumberEngine>
const Binaries openjij::graph::Graph::gen_binary ( RandomNumberEngine & random_numder_engine) const
inline

generate spins randomly.

Returns
generated spins

References _num_spins.

Referenced by openjij::declare_Graph().

Here is the caller graph for this function:

◆ gen_spin()

template<typename RandomNumberEngine>
const Spins openjij::graph::Graph::gen_spin ( RandomNumberEngine & random_numder_engine) const
inline

generate spins randomly.

Returns
generated spins

References _num_spins.

Referenced by openjij::declare_Graph().

Here is the caller graph for this function:

◆ get_num_spins()

◆ size()

std::size_t openjij::graph::Graph::size ( ) const
inlinenoexcept

Member Data Documentation

◆ _num_spins

const std::size_t openjij::graph::Graph::_num_spins
private

total number of spins

Referenced by gen_binary(), gen_spin(), get_num_spins(), Graph(), and size().


The documentation for this class was generated from the following file: