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

#include <qbpp.hpp>

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

Public Member Functions

 SolHolder (const QuadModel &quad_model)
 
 SolHolder (const SolHolder &other)=delete
 
virtual ~SolHolder ()=default
 
virtual std::optional< double > set_if_better (const qbpp::Sol &new_sol, const std::string &solver="")
 
virtual std::optional< qbpp::Solget_if_better (energy_t my_energy)
 
std::optional< qbpp::Solget_if_better (const Sol &my_sol)
 
std::tuple< Sol, double, std::string > get_sol_tts_solver () const
 
vindex_t var_count () const
 
energy_t get_energy () const
 
const Solget_sol () const
 
Sol copy_sol () const
 
void clear ()
 
double get_tts () const
 
std::string get_solver () const
 
void set_bound (energy_t bound)
 
std::optional< energy_tget_bound () const
 
 operator Sol () const
 

Protected Attributes

Sol sol_
 
std::optional< energy_tbound_ = std::nullopt
 
double startx_ = get_time()
 
double tts_ {0.0}
 
std::string solver_ = "N/A"
 
std::mutex mtx_
 

Detailed Description

Definition at line 1582 of file qbpp.hpp.

Constructor & Destructor Documentation

◆ SolHolder() [1/2]

qbpp::SolHolder::SolHolder ( const QuadModel quad_model)
inlineexplicit

Definition at line 1592 of file qbpp.hpp.

◆ SolHolder() [2/2]

qbpp::SolHolder::SolHolder ( const SolHolder other)
delete

◆ ~SolHolder()

virtual qbpp::SolHolder::~SolHolder ( )
virtualdefault

Member Function Documentation

◆ set_if_better()

virtual std::optional<double> qbpp::SolHolder::set_if_better ( const qbpp::Sol new_sol,
const std::string &  solver = "" 
)
inlinevirtual

Reimplemented in qbpp::factorization::SolHolder.

Definition at line 1600 of file qbpp.hpp.

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

◆ get_if_better() [1/2]

virtual std::optional<qbpp::Sol> qbpp::SolHolder::get_if_better ( energy_t  my_energy)
inlinevirtual

Definition at line 1616 of file qbpp.hpp.

Here is the call graph for this function:

◆ get_if_better() [2/2]

std::optional<qbpp::Sol> qbpp::SolHolder::get_if_better ( const Sol my_sol)
inline

Definition at line 1626 of file qbpp.hpp.

Here is the call graph for this function:

◆ get_sol_tts_solver()

std::tuple<Sol, double, std::string> qbpp::SolHolder::get_sol_tts_solver ( ) const
inline

Definition at line 1630 of file qbpp.hpp.

◆ var_count()

vindex_t qbpp::SolHolder::var_count ( ) const
inline

Definition at line 1635 of file qbpp.hpp.

Here is the call graph for this function:

◆ get_energy()

energy_t qbpp::SolHolder::get_energy ( ) const
inline

Definition at line 1637 of file qbpp.hpp.

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

◆ get_sol()

const Sol& qbpp::SolHolder::get_sol ( ) const
inline

Definition at line 1639 of file qbpp.hpp.

Here is the caller graph for this function:

◆ copy_sol()

Sol qbpp::SolHolder::copy_sol ( ) const
inline

Definition at line 1641 of file qbpp.hpp.

Here is the caller graph for this function:

◆ clear()

void qbpp::SolHolder::clear ( )
inline

Definition at line 1646 of file qbpp.hpp.

Here is the call graph for this function:

◆ get_tts()

double qbpp::SolHolder::get_tts ( ) const
inline

Definition at line 1653 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_solver()

std::string qbpp::SolHolder::get_solver ( ) const
inline

Definition at line 1655 of file qbpp.hpp.

Here is the caller graph for this function:

◆ set_bound()

void qbpp::SolHolder::set_bound ( energy_t  bound)
inline

Definition at line 1657 of file qbpp.hpp.

◆ get_bound()

std::optional<energy_t> qbpp::SolHolder::get_bound ( ) const
inline

Definition at line 1659 of file qbpp.hpp.

◆ operator Sol()

qbpp::SolHolder::operator Sol ( ) const
inline

Definition at line 1661 of file qbpp.hpp.

Member Data Documentation

◆ sol_

Sol qbpp::SolHolder::sol_
protected

Definition at line 1584 of file qbpp.hpp.

◆ bound_

std::optional<energy_t> qbpp::SolHolder::bound_ = std::nullopt
protected

Definition at line 1585 of file qbpp.hpp.

◆ startx_

double qbpp::SolHolder::startx_ = get_time()
protected

Definition at line 1586 of file qbpp.hpp.

◆ tts_

double qbpp::SolHolder::tts_ {0.0}
protected

Definition at line 1587 of file qbpp.hpp.

◆ solver_

std::string qbpp::SolHolder::solver_ = "N/A"
protected

Definition at line 1588 of file qbpp.hpp.

◆ mtx_

std::mutex qbpp::SolHolder::mtx_
mutableprotected

Definition at line 1589 of file qbpp.hpp.


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