A class for storing the ABS2 QUBO solution.
More...
#include <qbpp_abs2.hpp>
A class for storing the ABS2 QUBO solution.
This class is derived from qbpp::Sol and containing an abs2::Sol object.
Definition at line 148 of file qbpp_abs2.hpp.
◆ Sol()
qbpp_abs2::Sol::Sol |
( |
const Sol & |
sol | ) |
|
|
default |
Copy constructor.
- Parameters
-
◆ print()
void qbpp_abs2::Sol::print |
( |
const std::string & |
attrs | ) |
const |
|
inline |
◆ set() [1/5]
void qbpp_abs2::Sol::set |
( |
int |
index, |
|
|
bool |
value |
|
) |
| |
|
inline |
Set the value of the variable with "index" to "value".
- Parameters
-
index | Variable index |
value | Value |
Definition at line 179 of file qbpp_abs2.hpp.
◆ set() [2/5]
void qbpp_abs2::Sol::set |
( |
qbpp::Var |
var, |
|
|
bool |
value |
|
) |
| |
|
inline |
Set the value of the variable "var" to "value".
- Parameters
-
Definition at line 187 of file qbpp_abs2.hpp.
◆ get_tts()
double qbpp_abs2::Sol::get_tts |
( |
| ) |
const |
|
inline |
◆ get_abs2sol_ptr()
const std::shared_ptr<abs2::Sol> qbpp_abs2::Sol::get_abs2sol_ptr |
( |
| ) |
const |
|
inline |
Returns the reference to the ABS2 solution.
- Returns
- ABS2 solution
Definition at line 196 of file qbpp_abs2.hpp.
◆ comp_energy()
energy_t qbpp::Sol::comp_energy |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ get_map_list()
MapList qbpp::Sol::get_map_list |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ operator==()
bool qbpp::Sol::operator== |
( |
const Sol & |
sol | ) |
const |
|
inlineinherited |
◆ operator<()
bool qbpp::Sol::operator< |
( |
const Sol & |
sol | ) |
const |
|
inlineinherited |
◆ get() [1/4]
var_val_t qbpp::Sol::get |
( |
vindex_t |
index | ) |
const |
|
inlineinherited |
◆ get() [2/4]
var_val_t qbpp::Sol::get |
( |
Var |
var | ) |
const |
|
inlineinherited |
◆ get() [3/4]
energy_t qbpp::Sol::get |
( |
const Expr & |
expr | ) |
const |
|
inlineinherited |
◆ get() [4/4]
template<typename T >
auto qbpp::Sol::get |
( |
const Vector< T > & |
vec | ) |
const |
|
inlineinherited |
◆ has()
bool qbpp::Sol::has |
( |
Var |
var | ) |
const |
|
inlineinherited |
◆ clear()
void qbpp::Sol::clear |
( |
| ) |
|
|
inlineinherited |
◆ set() [3/5]
void qbpp::Sol::set |
( |
vindex_t |
index, |
|
|
bool |
value |
|
) |
| |
|
inlineinherited |
◆ set() [4/5]
Sol qbpp::Sol::set |
( |
const Sol & |
sol | ) |
|
|
inlineinherited |
◆ set() [5/5]
◆ flip() [1/2]
virtual void qbpp::Sol::flip |
( |
vindex_t |
index | ) |
|
|
inlinevirtualinherited |
◆ flip() [2/2]
void qbpp::Sol::flip |
( |
Var |
var | ) |
|
|
inlineinherited |
◆ popcount()
vindex_t qbpp::Sol::popcount |
( |
| ) |
const |
|
inlineinherited |
◆ get_energy()
energy_t qbpp::Sol::get_energy |
( |
| ) |
const |
|
inlineinherited |
◆ set_energy()
void qbpp::Sol::set_energy |
( |
energy_t |
energy | ) |
|
|
inlineinherited |
◆ get_bit_vector()
const impl::BitVector& qbpp::Sol::get_bit_vector |
( |
| ) |
const |
|
inlineinherited |
◆ var_count()
vindex_t qbpp::Sol::var_count |
( |
| ) |
const |
|
inlineinherited |
◆ get_constant()
energy_t qbpp::Sol::get_constant |
( |
| ) |
const |
|
inlineinherited |
◆ get_var()
Var qbpp::Sol::get_var |
( |
vindex_t |
index | ) |
const |
|
inlineinherited |
◆ get_index()
vindex_t qbpp::Sol::get_index |
( |
Var |
var | ) |
const |
|
inlineinherited |
◆ operator MapList()
qbpp::Sol::operator MapList |
( |
| ) |
const |
|
inlineinherited |
◆ abs2sol_ptr
const std::shared_ptr<abs2::Sol> qbpp_abs2::Sol::abs2sol_ptr |
|
private |
Sol object created by ABS2 QUBO solver.
- Note
- The shared_ptr is used to avoid copying the object.
Definition at line 151 of file qbpp_abs2.hpp.
◆ quad_model_
◆ bit_vector_
impl::BitVector qbpp::Sol::bit_vector_ |
|
protectedinherited |
◆ energy_
std::optional<energy_t> qbpp::Sol::energy_ = std::nullopt |
|
mutableprotectedinherited |
The documentation for this class was generated from the following file: