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

#include <qbpp_easy_solver.hpp>

Inheritance diagram for qbpp::easy_solver::PosMinSolDelta:
Inheritance graph
[legend]
Collaboration diagram for qbpp::easy_solver::PosMinSolDelta:
Collaboration graph
[legend]

Public Member Functions

 PosMinSolDelta (const EasySolver &easy_solver)
 
virtual ~PosMinSolDelta ()=default
 
vindex_t pos_count () const
 
vindex_t pos_min () const
 
void before_delta_updated (vindex_t, vindex_t k) override
 
void after_delta_updated (vindex_t, vindex_t k) override
 
void search (size_t iteration)
 
void print () const
 
void flip (vindex_t index) override
 
void flip (Var var)
 
bool tabu_has (vindex_t index) const
 
vindex_t non_tabu_random ()
 
energy_t get_delta (vindex_t i) const
 
std::optional< double > set_if_better (const std::string &solver_name)
 
vindex_t neg_count () const
 
vindex_t neg_random ()
 
vindex_t neg_min () const
 
virtual void before_delta_updated ([[maybe_unused]] vindex_t flip_index, [[maybe_unused]] vindex_t update_delta_index)
 
virtual void after_delta_updated ([[maybe_unused]] vindex_t flip_index, [[maybe_unused]] vindex_t update_delta_index)
 
void greedy ()
 
void random_flip (size_t iteration)
 
void move_to (qbpp::Sol destination)
 
bool operator== (const Sol &sol) const
 
bool operator< (const Sol &sol) const
 
var_val_t get (vindex_t index) const
 
var_val_t get (Var var) const
 
energy_t get (const Expr &expr) const
 
template<typename T >
auto get (const Vector< T > &vec) const
 
bool has (Var var) const
 
void clear ()
 
void set (vindex_t index, bool value)
 
void set (Var var, bool value)
 
Sol set (const Sol &sol)
 
Sol set (const MapList &map_list)
 
vindex_t popcount () const
 
energy_t get_energy () const
 
void set_energy (energy_t energy)
 
const impl::BitVectorget_bit_vector () const
 
vindex_t var_count () const
 
energy_t get_constant () const
 
Var get_var (vindex_t index) const
 
vindex_t get_index (Var var) const
 
 operator MapList () const
 

Protected Member Functions

energy_t comp_energy () const
 
MapList get_map_list () const
 

Protected Attributes

const vindex_t tabu_size_
 
Tabu tabu_
 
const EasySolvereasy_solver_
 
std::vector< energy_tdelta_
 
RandomMinSet neg_set_
 
std::shared_ptr< qbpp::SolHoldersol_holder_ptr_
 
const QuadModel quad_model_
 
impl::BitVector bit_vector_
 
std::optional< energy_tenergy_ = std::nullopt
 

Private Attributes

MinSet pos_set_
 

Detailed Description

Definition at line 284 of file qbpp_easy_solver.hpp.

Constructor & Destructor Documentation

◆ PosMinSolDelta()

qbpp::easy_solver::PosMinSolDelta::PosMinSolDelta ( const EasySolver easy_solver)
inlineexplicit

Definition at line 511 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:

◆ ~PosMinSolDelta()

virtual qbpp::easy_solver::PosMinSolDelta::~PosMinSolDelta ( )
virtualdefault

Member Function Documentation

◆ pos_count()

vindex_t qbpp::easy_solver::PosMinSolDelta::pos_count ( ) const
inline

Definition at line 292 of file qbpp_easy_solver.hpp.

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

◆ pos_min()

vindex_t qbpp::easy_solver::PosMinSolDelta::pos_min ( ) const
inline

Definition at line 294 of file qbpp_easy_solver.hpp.

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

◆ before_delta_updated() [1/2]

void qbpp::easy_solver::PosMinSolDelta::before_delta_updated ( vindex_t  ,
vindex_t  k 
)
inlineoverride

Definition at line 296 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:

◆ after_delta_updated() [1/2]

void qbpp::easy_solver::PosMinSolDelta::after_delta_updated ( vindex_t  ,
vindex_t  k 
)
inlineoverride

Definition at line 302 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:

◆ search()

void qbpp::easy_solver::PosMinSolDelta::search ( size_t  iteration)
inline

Definition at line 524 of file qbpp_easy_solver.hpp.

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

◆ print()

void qbpp::easy_solver::PosMinSolDelta::print ( ) const
inline

Definition at line 310 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:

◆ flip() [1/2]

void qbpp::easy_solver::TabuSolDelta::flip ( vindex_t  index)
inlineoverridevirtualinherited

Reimplemented from qbpp::easy_solver::SolDelta.

Definition at line 274 of file qbpp_easy_solver.hpp.

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

◆ flip() [2/2]

void qbpp::Sol::flip ( Var  var)
inlineinherited

Definition at line 1538 of file qbpp.hpp.

Here is the call graph for this function:

◆ tabu_has()

bool qbpp::easy_solver::TabuSolDelta::tabu_has ( vindex_t  index) const
inlineinherited

Definition at line 279 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:

◆ non_tabu_random()

vindex_t qbpp::easy_solver::TabuSolDelta::non_tabu_random ( )
inlineinherited

Definition at line 281 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:

◆ get_delta()

energy_t qbpp::easy_solver::SolDelta::get_delta ( vindex_t  i) const
inlineinherited

Definition at line 233 of file qbpp_easy_solver.hpp.

Here is the caller graph for this function:

◆ set_if_better()

std::optional< double > qbpp::easy_solver::SolDelta::set_if_better ( const std::string &  solver_name)
inlineinherited

Definition at line 500 of file qbpp_easy_solver.hpp.

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

◆ neg_count()

vindex_t qbpp::easy_solver::SolDelta::neg_count ( ) const
inlineinherited

Definition at line 239 of file qbpp_easy_solver.hpp.

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

◆ neg_random()

vindex_t qbpp::easy_solver::SolDelta::neg_random ( )
inlineinherited

Definition at line 241 of file qbpp_easy_solver.hpp.

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

◆ neg_min()

vindex_t qbpp::easy_solver::SolDelta::neg_min ( ) const
inlineinherited

Definition at line 243 of file qbpp_easy_solver.hpp.

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

◆ before_delta_updated() [2/2]

virtual void qbpp::easy_solver::SolDelta::before_delta_updated ( [[maybe_unused] ] vindex_t  flip_index,
[[maybe_unused] ] vindex_t  update_delta_index 
)
inlinevirtualinherited

Definition at line 245 of file qbpp_easy_solver.hpp.

Here is the caller graph for this function:

◆ after_delta_updated() [2/2]

virtual void qbpp::easy_solver::SolDelta::after_delta_updated ( [[maybe_unused] ] vindex_t  flip_index,
[[maybe_unused] ] vindex_t  update_delta_index 
)
inlinevirtualinherited

Definition at line 249 of file qbpp_easy_solver.hpp.

Here is the caller graph for this function:

◆ greedy()

void qbpp::easy_solver::SolDelta::greedy ( )
inlineinherited

Definition at line 458 of file qbpp_easy_solver.hpp.

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

◆ random_flip()

void qbpp::easy_solver::SolDelta::random_flip ( size_t  iteration)
inlineinherited

Definition at line 466 of file qbpp_easy_solver.hpp.

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

◆ move_to()

void qbpp::easy_solver::SolDelta::move_to ( qbpp::Sol  destination)
inlineinherited

Definition at line 474 of file qbpp_easy_solver.hpp.

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

◆ comp_energy()

energy_t qbpp::Sol::comp_energy ( ) const
inlineprotectedinherited

Definition at line 2809 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_map_list()

MapList qbpp::Sol::get_map_list ( ) const
inlineprotectedinherited

Definition at line 2834 of file qbpp.hpp.

Here is the call graph for this function:

◆ operator==()

bool qbpp::Sol::operator== ( const Sol sol) const
inlineinherited

Definition at line 1487 of file qbpp.hpp.

Here is the call graph for this function:

◆ operator<()

bool qbpp::Sol::operator< ( const Sol sol) const
inlineinherited

Definition at line 1491 of file qbpp.hpp.

Here is the call graph for this function:

◆ get() [1/4]

var_val_t qbpp::Sol::get ( vindex_t  index) const
inlineinherited

Definition at line 1500 of file qbpp.hpp.

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

◆ get() [2/4]

var_val_t qbpp::Sol::get ( Var  var) const
inlineinherited

Definition at line 1502 of file qbpp.hpp.

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

◆ get() [3/4]

energy_t qbpp::Sol::get ( const Expr expr) const
inlineinherited

Definition at line 1504 of file qbpp.hpp.

Here is the call graph for this function:

◆ get() [4/4]

template<typename T >
auto qbpp::Sol::get ( const Vector< T > &  vec) const
inlineinherited

Definition at line 1514 of file qbpp.hpp.

Here is the call graph for this function:

◆ has()

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

Definition at line 1506 of file qbpp.hpp.

Here is the call graph for this function:

◆ clear()

void qbpp::Sol::clear ( )
inlineinherited

Definition at line 1508 of file qbpp.hpp.

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

◆ set() [1/4]

void qbpp::Sol::set ( vindex_t  index,
bool  value 
)
inlineinherited

Definition at line 1523 of file qbpp.hpp.

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

◆ set() [2/4]

void qbpp::Sol::set ( Var  var,
bool  value 
)
inlineinherited

Definition at line 1528 of file qbpp.hpp.

Here is the call graph for this function:

◆ set() [3/4]

Sol qbpp::Sol::set ( const Sol sol)
inlineinherited

Definition at line 1566 of file qbpp.hpp.

Here is the call graph for this function:

◆ set() [4/4]

Sol qbpp::Sol::set ( const MapList map_list)
inlineinherited

Definition at line 1573 of file qbpp.hpp.

Here is the call graph for this function:

◆ popcount()

vindex_t qbpp::Sol::popcount ( ) const
inlineinherited

Definition at line 1543 of file qbpp.hpp.

Here is the call graph for this function:

◆ get_energy()

energy_t qbpp::Sol::get_energy ( ) const
inlineinherited

Definition at line 1545 of file qbpp.hpp.

Here is the caller graph for this function:

◆ set_energy()

void qbpp::Sol::set_energy ( energy_t  energy)
inlineinherited

Definition at line 1550 of file qbpp.hpp.

Here is the caller graph for this function:

◆ get_bit_vector()

const impl::BitVector& qbpp::Sol::get_bit_vector ( ) const
inlineinherited

Definition at line 1552 of file qbpp.hpp.

◆ var_count()

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

Definition at line 1556 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::Sol::get_constant ( ) const
inlineinherited

Definition at line 1558 of file qbpp.hpp.

Here is the call graph for this function:

◆ get_var()

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

Definition at line 1560 of file qbpp.hpp.

Here is the call graph for this function:

◆ get_index()

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

Definition at line 1562 of file qbpp.hpp.

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

◆ operator MapList()

qbpp::Sol::operator MapList ( ) const
inlineinherited

Definition at line 1564 of file qbpp.hpp.

Member Data Documentation

◆ pos_set_

MinSet qbpp::easy_solver::PosMinSolDelta::pos_set_
private

Definition at line 285 of file qbpp_easy_solver.hpp.

◆ tabu_size_

const vindex_t qbpp::easy_solver::TabuSolDelta::tabu_size_
protectedinherited

Definition at line 262 of file qbpp_easy_solver.hpp.

◆ tabu_

Tabu qbpp::easy_solver::TabuSolDelta::tabu_
protectedinherited

Definition at line 264 of file qbpp_easy_solver.hpp.

◆ easy_solver_

const EasySolver& qbpp::easy_solver::SolDelta::easy_solver_
protectedinherited

Definition at line 220 of file qbpp_easy_solver.hpp.

◆ delta_

std::vector<energy_t> qbpp::easy_solver::SolDelta::delta_
protectedinherited

Definition at line 222 of file qbpp_easy_solver.hpp.

◆ neg_set_

RandomMinSet qbpp::easy_solver::SolDelta::neg_set_
protectedinherited

Definition at line 224 of file qbpp_easy_solver.hpp.

◆ sol_holder_ptr_

std::shared_ptr<qbpp::SolHolder> qbpp::easy_solver::SolDelta::sol_holder_ptr_
protectedinherited

Definition at line 226 of file qbpp_easy_solver.hpp.

◆ quad_model_

const QuadModel qbpp::Sol::quad_model_
protectedinherited

Definition at line 1444 of file qbpp.hpp.

◆ bit_vector_

impl::BitVector qbpp::Sol::bit_vector_
protectedinherited

Definition at line 1446 of file qbpp.hpp.

◆ energy_

std::optional<energy_t> qbpp::Sol::energy_ = std::nullopt
mutableprotectedinherited

Definition at line 1448 of file qbpp.hpp.


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