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

#include <qbpp.hpp>

Inheritance diagram for qbpp::QuadModel:
Inheritance graph
[legend]
Collaboration diagram for qbpp::QuadModel:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

 QuadModel (const QuadModel &)=default
 
 QuadModel (QuadModel &&) noexcept=default
 
 QuadModel (const Model &model)
 
 QuadModel (Model &&model)
 
 QuadModel (const Expr &expr)
 
 QuadModel (Expr &&expr)
 
const std::vector< coeff_t > & get_linear () const
 
const std::vector< vindex_t > & get_degree () const
 
const std::vector< std::vector< std::pair< vindex_t, coeff_t > > > & get_quadratic () const
 
coeff_t get_linear (vindex_t index) const
 
vindex_t get_degree (vindex_t index) const
 
std::pair< vindex_t, coeff_tget_quadratic (vindex_t i, vindex_t j) const
 
size_t term_count (vindex_t deg) const
 
size_t term_count () const override
 
coeff_t get_min_coeff () const
 
coeff_t get_max_coeff () const
 
vindex_t var_count () const
 
Var get_var (vindex_t index) const
 
vindex_t get_index (Var var) const
 
bool has (Var var) const
 
const Exprget_expr () const
 
 operator const Expr & () const
 
energy_t get_constant () const
 
const Termsget_terms () const
 
std::vector< Varget_index_var () const
 

Static Protected Member Functions

static const Exprcheck_expr (const Expr &expr)
 
static Expr check_expr (Expr &&expr)
 

Protected Attributes

const std::shared_ptr< const Exprexpr_ptr_
 
const std::shared_ptr< const impl::IndexVarMapperindex_var_ptr_
 

Private Member Functions

QuadModeloperator= (QuadModel &&)=delete
 
QuadModeloperator= (const QuadModel &)=delete
 

Private Attributes

const std::shared_ptr< const Implpimpl_
 
const std::vector< coeff_t > & linear_
 
const std::vector< vindex_t > & degree_
 
const std::vector< std::vector< std::pair< vindex_t, coeff_t > > > & quadratic_
 

Detailed Description

Definition at line 1178 of file qbpp.hpp.

Constructor & Destructor Documentation

◆ QuadModel() [1/6]

qbpp::QuadModel::QuadModel ( const QuadModel )
default

◆ QuadModel() [2/6]

qbpp::QuadModel::QuadModel ( QuadModel &&  )
defaultnoexcept

◆ QuadModel() [3/6]

qbpp::QuadModel::QuadModel ( const Model model)
inline

Definition at line 1213 of file qbpp.hpp.

◆ QuadModel() [4/6]

qbpp::QuadModel::QuadModel ( Model &&  model)
inline

Definition at line 1220 of file qbpp.hpp.

◆ QuadModel() [5/6]

qbpp::QuadModel::QuadModel ( const Expr expr)
inline

Definition at line 1227 of file qbpp.hpp.

◆ QuadModel() [6/6]

qbpp::QuadModel::QuadModel ( Expr &&  expr)
inline

Definition at line 1234 of file qbpp.hpp.

Member Function Documentation

◆ operator=() [1/2]

QuadModel& qbpp::QuadModel::operator= ( QuadModel &&  )
privatedelete

◆ operator=() [2/2]

QuadModel& qbpp::QuadModel::operator= ( const QuadModel )
privatedelete

◆ get_linear() [1/2]

const std::vector<coeff_t>& qbpp::QuadModel::get_linear ( ) const
inline

Definition at line 1241 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_degree() [1/2]

const std::vector<vindex_t>& qbpp::QuadModel::get_degree ( ) const
inline

Definition at line 1243 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_quadratic() [1/2]

const std::vector<std::vector<std::pair<vindex_t, coeff_t> > >& qbpp::QuadModel::get_quadratic ( ) const
inline

Definition at line 1245 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_linear() [2/2]

coeff_t qbpp::QuadModel::get_linear ( vindex_t  index) const
inline

Definition at line 1250 of file qbpp.hpp.

◆ get_degree() [2/2]

vindex_t qbpp::QuadModel::get_degree ( vindex_t  index) const
inline

Definition at line 1252 of file qbpp.hpp.

◆ get_quadratic() [2/2]

std::pair<vindex_t, coeff_t> qbpp::QuadModel::get_quadratic ( vindex_t  i,
vindex_t  j 
) const
inline

Definition at line 1254 of file qbpp.hpp.

◆ term_count() [1/2]

size_t qbpp::QuadModel::term_count ( vindex_t  deg) const
inline

Definition at line 1258 of file qbpp.hpp.

Here is the caller graph for this function:

◆ term_count() [2/2]

size_t qbpp::QuadModel::term_count ( ) const
inlineoverridevirtual

Reimplemented from qbpp::Model.

Definition at line 1268 of file qbpp.hpp.

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

◆ get_min_coeff()

coeff_t qbpp::QuadModel::get_min_coeff ( ) const
inline

Definition at line 1270 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_max_coeff()

coeff_t qbpp::QuadModel::get_max_coeff ( ) const
inline

Definition at line 1272 of file qbpp.hpp.

Here is the caller graph for this function:

◆ check_expr() [1/2]

static const Expr& qbpp::Model::check_expr ( const Expr expr)
inlinestaticprotectedinherited

Definition at line 1111 of file qbpp.hpp.

Here is the call graph for this function:

◆ check_expr() [2/2]

static Expr qbpp::Model::check_expr ( Expr &&  expr)
inlinestaticprotectedinherited

Definition at line 1120 of file qbpp.hpp.

Here is the call graph for this function:

◆ var_count()

vindex_t qbpp::Model::var_count ( ) const
inlineinherited

Definition at line 1154 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_var()

Var qbpp::Model::get_var ( vindex_t  index) const
inlineinherited

Definition at line 1156 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_index()

vindex_t qbpp::Model::get_index ( Var  var) const
inlineinherited

Definition at line 1158 of file qbpp.hpp.

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

◆ has()

bool qbpp::Model::has ( Var  var) const
inlineinherited

Definition at line 1160 of file qbpp.hpp.

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

◆ get_expr()

const Expr& qbpp::Model::get_expr ( ) const
inlineinherited

Definition at line 1164 of file qbpp.hpp.

Here is the caller graph for this function:

◆ operator const Expr &()

qbpp::Model::operator const Expr & ( ) const
inlineinherited

Definition at line 1166 of file qbpp.hpp.

◆ get_constant()

energy_t qbpp::Model::get_constant ( ) const
inlineinherited

Definition at line 1168 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_terms()

const Terms& qbpp::Model::get_terms ( ) const
inlineinherited

Definition at line 1170 of file qbpp.hpp.

◆ get_index_var()

std::vector<Var> qbpp::Model::get_index_var ( ) const
inlineinherited

Definition at line 1172 of file qbpp.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ pimpl_

const std::shared_ptr<const Impl> qbpp::QuadModel::pimpl_
private

Definition at line 1195 of file qbpp.hpp.

◆ linear_

const std::vector<coeff_t>& qbpp::QuadModel::linear_
private

Definition at line 1197 of file qbpp.hpp.

◆ degree_

const std::vector<vindex_t>& qbpp::QuadModel::degree_
private

Definition at line 1199 of file qbpp.hpp.

◆ quadratic_

const std::vector<std::vector<std::pair<vindex_t, coeff_t> > >& qbpp::QuadModel::quadratic_
private

Definition at line 1201 of file qbpp.hpp.

◆ expr_ptr_

const std::shared_ptr<const Expr> qbpp::Model::expr_ptr_
protectedinherited

Definition at line 1107 of file qbpp.hpp.

◆ index_var_ptr_

const std::shared_ptr<const impl::IndexVarMapper> qbpp::Model::index_var_ptr_
protectedinherited

Definition at line 1109 of file qbpp.hpp.


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