QUBO++ Library with QUBO Solver APIs
Author: Koji Nakano, License: Non-commercial research and evaluation purposes without any guarantees.
Classes | Functions
QUBO++ API for ABS2 QUBO Solver

API for calling the ABS2 QUBO solver from the QUBO++ Library. More...

Classes

class  qbpp_abs2::Solver
 A class for calling the ABS2 QUBO solver. More...
 
class  qbpp_abs2::QuadModel
 A class for storing both the qbpp::QuadModel and abs2::Model. More...
 
class  qbpp_abs2::Param
 A class for setting parameters for the ABS2 QUBO solver. More...
 
class  qbpp_abs2::Sol
 A class for storing the ABS2 QUBO solution. More...
 
class  qbpp_abs2::Callback
 A class for defining the ABS2 callback function. More...
 

Functions

Sol qbpp_abs2::Solver::operator() (const QuadModel &quad_model, Param &param) const
 Executes ABS2 for "quad_model" with "param" and returns "sol". More...
 
Sol qbpp_abs2::Solver::operator() (const QuadModel &quad_model, Param &param, const Sol &start) const
 Executes ABS2 for model with "param" and "start", and returns "sol". More...
 
 qbpp_abs2::Param::Param ()=default
 Construct a new Param object from a QuadModel object. More...
 
void qbpp_abs2::Param::set_target_energy (qbpp::energy_t target_energy)
 Set the target energy for ABS2 QUBO solver. More...
 
std::optional< qbpp::energy_tqbpp_abs2::Param::get_target_energy () const
 Get the target energy for ABS2 QUBO solver. More...
 
void qbpp_abs2::Param::set_time_limit (uint32_t time_limit)
 Set the time limit for ABS2 QUBO solver. More...
 
void qbpp_abs2::Param::set_arithmetic_bits (uint32_t bits)
 Set the arithmetic bits. More...
 
 qbpp_abs2::Sol::Sol (const QuadModel &quad_model, const abs2::Sol &sol)
 Construct a new Sol object from an ABS2 solution. More...
 
 qbpp_abs2::Sol::Sol (const qbpp::Sol &sol)
 Construct a new Sol object from a QUBO++ QUBO solution. More...
 
 qbpp_abs2::Callback::Callback (const QuadModel &quad_model)
 Construct a new Callback object. More...
 
virtual qbpp_abs2::Callback::~Callback ()=default
 Destructor for deleting a callback object. More...
 
Sol qbpp_abs2::Callback::get_sol () const
 Get the solution from the ABS2 solver. More...
 
void qbpp_abs2::Callback::set_hint (const Sol &hint)
 Provide a hint solution to the ABS2 solver. More...
 
virtual void qbpp_abs2::Callback::callback (const std::string &event)
 The default callback function for ABS2 QUBO solver. More...
 
 qbpp_abs2::QuadModel::QuadModel (const qbpp::QuadModel &quad_model)
 Constructor: Create an ABS2 model from a QUBO model. More...
 

Detailed Description

API for calling the ABS2 QUBO solver from the QUBO++ Library.

This API provides a way to call the ABS2 QUBO solver from the QUBO++ Library. It includes the following classes:

Please refer to Sample Programs for examples of how to use these classes.

Function Documentation

◆ operator()() [1/2]

Sol qbpp_abs2::Solver::operator() ( const QuadModel quad_model,
Param param 
) const
inline

Executes ABS2 for "quad_model" with "param" and returns "sol".

Parameters
quad_modelQuadModel object
paramABS2 parameters
Returns
Sol QUBO solution

Definition at line 278 of file qbpp_abs2.hpp.

Here is the call graph for this function:

◆ operator()() [2/2]

Sol qbpp_abs2::Solver::operator() ( const QuadModel quad_model,
Param param,
const Sol start 
) const
inline

Executes ABS2 for model with "param" and "start", and returns "sol".

Parameters
quad_modelQuadModel object
paramABS2 parameters
startInitial solution
Returns
Sol QUBO solution

Definition at line 291 of file qbpp_abs2.hpp.

Here is the call graph for this function:

◆ Param()

qbpp_abs2::Param::Param ( )
default

Construct a new Param object from a QuadModel object.

Note
The default constructor can be omitted but defined for Doxygen.

◆ set_target_energy()

void qbpp_abs2::Param::set_target_energy ( qbpp::energy_t  target_energy)
inline

Set the target energy for ABS2 QUBO solver.

Parameters
target_energyTarget energy

Definition at line 120 of file qbpp_abs2.hpp.

Here is the caller graph for this function:

◆ get_target_energy()

std::optional<qbpp::energy_t> qbpp_abs2::Param::get_target_energy ( ) const
inline

Get the target energy for ABS2 QUBO solver.

Returns
Target energy

Definition at line 126 of file qbpp_abs2.hpp.

Here is the caller graph for this function:

◆ set_time_limit()

void qbpp_abs2::Param::set_time_limit ( uint32_t  time_limit)
inline

Set the time limit for ABS2 QUBO solver.

Parameters
time_limitTime limit in seconds.

Definition at line 132 of file qbpp_abs2.hpp.

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

◆ set_arithmetic_bits()

void qbpp_abs2::Param::set_arithmetic_bits ( uint32_t  bits)
inline

Set the arithmetic bits.

Parameters
bitsNumber of bits for arithmetic: 32 or 64

Definition at line 138 of file qbpp_abs2.hpp.

Here is the call graph for this function:

◆ Sol() [1/2]

qbpp_abs2::Sol::Sol ( const QuadModel quad_model,
const abs2::Sol sol 
)
inline

Construct a new Sol object from an ABS2 solution.

Parameters
quad_modelABS2 QUBO model
solABS2 solution

Definition at line 308 of file qbpp_abs2.hpp.

Here is the call graph for this function:

◆ Sol() [2/2]

qbpp_abs2::Sol::Sol ( const qbpp::Sol sol)
inline

Construct a new Sol object from a QUBO++ QUBO solution.

Parameters
solQUBO++ QUBO solution

Definition at line 316 of file qbpp_abs2.hpp.

Here is the call graph for this function:

◆ Callback()

qbpp_abs2::Callback::Callback ( const QuadModel quad_model)
inline

Construct a new Callback object.

Parameters
quad_modelABS2 QuadModel object

Definition at line 215 of file qbpp_abs2.hpp.

◆ ~Callback()

virtual qbpp_abs2::Callback::~Callback ( )
virtualdefault

Destructor for deleting a callback object.

Note
Do not delete the callback object.

Reimplemented from abs2::Callback.

◆ get_sol()

Sol qbpp_abs2::Callback::get_sol ( ) const
inline

Get the solution from the ABS2 solver.

Returns
Sol QUBO solution

Definition at line 222 of file qbpp_abs2.hpp.

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

◆ set_hint()

void qbpp_abs2::Callback::set_hint ( const Sol hint)
inline

Provide a hint solution to the ABS2 solver.

Parameters
hintHint solution such as the best solution found so far.

Hint is given to the ABS2 solver to improve the solution.

Definition at line 227 of file qbpp_abs2.hpp.

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

◆ callback()

virtual void qbpp_abs2::Callback::callback ( const std::string &  event)
inlinevirtual

The default callback function for ABS2 QUBO solver.

This function is called by ABS2 QUBO solver when an event occurs.

Parameters
eventEvent type specfied by ABS2 QUBO solver
Note
This is a default callback function that displays the TTS and the energy when a new best solution is obtained. This function can be customized by overriding it.

Implements abs2::Callback.

Reimplemented in ABS2Callback, and qbpp::factorization::ABS2Callback.

Definition at line 236 of file qbpp_abs2.hpp.

Here is the call graph for this function:

◆ QuadModel()

qbpp_abs2::QuadModel::QuadModel ( const qbpp::QuadModel quad_model)
inline

Constructor: Create an ABS2 model from a QUBO model.

Parameters
quad_modelqbpp::QuadModel object

Definition at line 254 of file qbpp_abs2.hpp.

Here is the call graph for this function: