QUBO++ Library with QUBO Solver APIs
Author: Koji Nakano, License: Non-commercial research and evaluation purposes without any guarantees.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
qbpp::Expr Class Reference

#include <qbpp.hpp>

Public Member Functions

 Expr ()
 
 Expr (const Expr &expr, size_t term_capacity=TERM_CAPACITY)
 
 Expr (Expr &&expr) noexcept=default
 
template<typename T , typename std::enable_if< std::is_convertible< T, energy_t >::value, int >::type = 0>
 Expr (T value, size_t term_capacity=TERM_CAPACITY)
 
 Expr (Var var)
 
 Expr (const Term &term, size_t term_capacity=TERM_CAPACITY)
 
 Expr (Term &&term, size_t term_capacity=TERM_CAPACITY) noexcept
 
 Expr (energy_t constant, Terms &&terms) noexcept
 
 Expr (energy_t constant, const Terms &terms) noexcept
 
 Expr (const VarInt &var_int)
 
 Expr (VarInt &&var_int)
 
Exproperator= (const Expr &expr)
 
Exproperator= (Expr &&expr) noexcept
 
template<typename T , typename std::enable_if< std::is_convertible< T, energy_t >::value, int >::type = 0>
Exproperator*= (T val)
 
Exproperator*= (const Term &term)
 
Exproperator*= (const Expr &expr)
 
Exproperator+= (const Expr &expr)
 
Exproperator-= (const Expr &expr)
 
Exproperator/= (energy_t val)
 
Exprsqr ()
 
Exprsimplify (Vars(*sort_vars)(const Vars &))
 
Exprsimplify_as_binary ()
 
Exprsimplify_as_spin ()
 
energy_t get_constant () const
 
void set_constant (energy_t constant)
 
const Termsget_terms () const
 
Termsget_terms ()
 
size_t term_count () const
 
size_t size () const
 
Exprreplace (const MapList &map_list)
 
Expr operator() (const MapList &map_list) const
 
Exprreduce ()
 
Exprbinary_to_spin ()
 
Exprspin_to_binary ()
 
energy_t pos_sum () const
 
energy_t neg_sum () const
 

Private Member Functions

 Expr (bool b)=delete
 

Private Attributes

energy_t constant_ {0}
 
Terms terms_
 

Detailed Description

Definition at line 731 of file qbpp.hpp.

Constructor & Destructor Documentation

◆ Expr() [1/12]

qbpp::Expr::Expr ( bool  b)
privatedelete

◆ Expr() [2/12]

qbpp::Expr::Expr ( )
inline

Definition at line 742 of file qbpp.hpp.

◆ Expr() [3/12]

qbpp::Expr::Expr ( const Expr expr,
size_t  term_capacity = TERM_CAPACITY 
)
inline

Definition at line 744 of file qbpp.hpp.

Here is the call graph for this function:

◆ Expr() [4/12]

qbpp::Expr::Expr ( Expr &&  expr)
defaultnoexcept

◆ Expr() [5/12]

template<typename T , typename std::enable_if< std::is_convertible< T, energy_t >::value, int >::type = 0>
qbpp::Expr::Expr ( value,
size_t  term_capacity = TERM_CAPACITY 
)
inline

Definition at line 755 of file qbpp.hpp.

◆ Expr() [6/12]

qbpp::Expr::Expr ( Var  var)
inline

Definition at line 760 of file qbpp.hpp.

Here is the call graph for this function:

◆ Expr() [7/12]

qbpp::Expr::Expr ( const Term term,
size_t  term_capacity = TERM_CAPACITY 
)
inline

Definition at line 762 of file qbpp.hpp.

◆ Expr() [8/12]

qbpp::Expr::Expr ( Term &&  term,
size_t  term_capacity = TERM_CAPACITY 
)
inlinenoexcept

Definition at line 767 of file qbpp.hpp.

◆ Expr() [9/12]

qbpp::Expr::Expr ( energy_t  constant,
Terms &&  terms 
)
inlinenoexcept

Definition at line 772 of file qbpp.hpp.

◆ Expr() [10/12]

qbpp::Expr::Expr ( energy_t  constant,
const Terms terms 
)
inlinenoexcept

Definition at line 775 of file qbpp.hpp.

◆ Expr() [11/12]

qbpp::Expr::Expr ( const VarInt var_int)
inline

Definition at line 1964 of file qbpp.hpp.

Here is the call graph for this function:

◆ Expr() [12/12]

qbpp::Expr::Expr ( VarInt &&  var_int)
inline

Definition at line 1973 of file qbpp.hpp.

Here is the call graph for this function:

Member Function Documentation

◆ operator=() [1/2]

Expr& qbpp::Expr::operator= ( const Expr expr)
inline

Definition at line 783 of file qbpp.hpp.

Here is the call graph for this function:

◆ operator=() [2/2]

Expr& qbpp::Expr::operator= ( Expr &&  expr)
inlinenoexcept

Definition at line 791 of file qbpp.hpp.

Here is the call graph for this function:

◆ operator*=() [1/3]

template<typename T , typename std::enable_if< std::is_convertible< T, energy_t >::value, int >::type = 0>
Expr& qbpp::Expr::operator*= ( val)
inline

Definition at line 803 of file qbpp.hpp.

◆ operator*=() [2/3]

Expr& qbpp::Expr::operator*= ( const Term term)
inline

Definition at line 822 of file qbpp.hpp.

Here is the call graph for this function:

◆ operator*=() [3/3]

Expr& qbpp::Expr::operator*= ( const Expr expr)
inline

Definition at line 843 of file qbpp.hpp.

Here is the call graph for this function:

◆ operator+=()

Expr& qbpp::Expr::operator+= ( const Expr expr)
inline

Definition at line 921 of file qbpp.hpp.

Here is the call graph for this function:

◆ operator-=()

Expr& qbpp::Expr::operator-= ( const Expr expr)
inline

Definition at line 928 of file qbpp.hpp.

Here is the call graph for this function:

◆ operator/=()

Expr& qbpp::Expr::operator/= ( energy_t  val)
inline

Definition at line 934 of file qbpp.hpp.

◆ sqr()

Expr& qbpp::Expr::sqr ( )
inline

Definition at line 949 of file qbpp.hpp.

◆ simplify()

Expr & qbpp::Expr::simplify ( Vars(*)(const Vars &)  sort_vars = sort_vars)
inline

Definition at line 1952 of file qbpp.hpp.

Here is the call graph for this function:

◆ simplify_as_binary()

Expr & qbpp::Expr::simplify_as_binary ( )
inline

Definition at line 1956 of file qbpp.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ simplify_as_spin()

Expr & qbpp::Expr::simplify_as_spin ( )
inline

Definition at line 1960 of file qbpp.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_constant()

energy_t qbpp::Expr::get_constant ( ) const
inline

Definition at line 964 of file qbpp.hpp.

Here is the caller graph for this function:

◆ set_constant()

void qbpp::Expr::set_constant ( energy_t  constant)
inline

Definition at line 966 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_terms() [1/2]

const Terms& qbpp::Expr::get_terms ( ) const
inline

Definition at line 968 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_terms() [2/2]

Terms& qbpp::Expr::get_terms ( )
inline

Definition at line 970 of file qbpp.hpp.

◆ term_count()

size_t qbpp::Expr::term_count ( ) const
inline

Definition at line 972 of file qbpp.hpp.

Here is the caller graph for this function:

◆ size()

size_t qbpp::Expr::size ( ) const
inline

Definition at line 974 of file qbpp.hpp.

Here is the caller graph for this function:

◆ replace()

Expr & qbpp::Expr::replace ( const MapList map_list)
inline

Definition at line 2045 of file qbpp.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator()()

Expr qbpp::Expr::operator() ( const MapList map_list) const
inline

Definition at line 980 of file qbpp.hpp.

Here is the call graph for this function:

◆ reduce()

Expr& qbpp::Expr::reduce ( )
inline

Definition at line 988 of file qbpp.hpp.

Here is the call graph for this function:

◆ binary_to_spin()

Expr& qbpp::Expr::binary_to_spin ( )
inline

Definition at line 992 of file qbpp.hpp.

Here is the call graph for this function:

◆ spin_to_binary()

Expr& qbpp::Expr::spin_to_binary ( )
inline

Definition at line 994 of file qbpp.hpp.

Here is the call graph for this function:

◆ pos_sum()

energy_t qbpp::Expr::pos_sum ( ) const
inline

Definition at line 996 of file qbpp.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ neg_sum()

energy_t qbpp::Expr::neg_sum ( ) const
inline

Definition at line 1007 of file qbpp.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ constant_

energy_t qbpp::Expr::constant_ {0}
private

Definition at line 733 of file qbpp.hpp.

◆ terms_

Terms qbpp::Expr::terms_
private

Definition at line 735 of file qbpp.hpp.


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