API for calling the ABS2 QUBO solver from the QUBO++ Library.
More...
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.
◆ 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_model | QuadModel object |
param | ABS2 parameters |
- Returns
- Sol QUBO solution
Definition at line 278 of file qbpp_abs2.hpp.
◆ 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_model | QuadModel object |
param | ABS2 parameters |
start | Initial solution |
- Returns
- Sol QUBO solution
Definition at line 291 of file qbpp_abs2.hpp.
◆ 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_energy | Target energy |
Definition at line 120 of file qbpp_abs2.hpp.
◆ 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.
◆ 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_limit | Time limit in seconds. |
Definition at line 132 of file qbpp_abs2.hpp.
◆ set_arithmetic_bits()
void qbpp_abs2::Param::set_arithmetic_bits |
( |
uint32_t |
bits | ) |
|
|
inline |
Set the arithmetic bits.
- Parameters
-
bits | Number of bits for arithmetic: 32 or 64 |
Definition at line 138 of file qbpp_abs2.hpp.
◆ Sol() [1/2]
Construct a new Sol object from an ABS2 solution.
- Parameters
-
quad_model | ABS2 QUBO model |
sol | ABS2 solution |
Definition at line 308 of file qbpp_abs2.hpp.
◆ Sol() [2/2]
Construct a new Sol object from a QUBO++ QUBO solution.
- Parameters
-
Definition at line 316 of file qbpp_abs2.hpp.
◆ Callback()
qbpp_abs2::Callback::Callback |
( |
const QuadModel & |
quad_model | ) |
|
|
inline |
◆ ~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.
◆ set_hint()
void qbpp_abs2::Callback::set_hint |
( |
const Sol & |
hint | ) |
|
|
inline |
Provide a hint solution to the ABS2 solver.
- Parameters
-
hint | Hint 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.
◆ 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
-
event | Event 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.
◆ QuadModel()
Constructor: Create an ABS2 model from a QUBO model.
- Parameters
-
Definition at line 254 of file qbpp_abs2.hpp.