Class to store a solution computed by ABS2 QUBO solver.
More...
#include <abs2.hpp>
|
| | Sol (int size) |
| | Constructor for a solution with "size" bits. More...
|
| |
| | Sol () |
| | Construct a new Sol object. More...
|
| |
| | ~Sol () |
| | Destructor. More...
|
| |
| | Sol (const Sol &sol) |
| | Copy constructor. Create a new Sol object from "sol". More...
|
| |
| | Sol (Sol &&sol) |
| | Move constructor. Create a new Sol object from "sol". More...
|
| |
| Sol & | operator= (const Sol &sol) |
| | Copy assignment of "sol". More...
|
| |
| Sol & | operator= (Sol &&sol) |
| | Move assignment of "sol". More...
|
| |
| void | set (int i, bool val) |
| | Set "val" to x_i. More...
|
| |
| bool | get (int i) const |
| | Get the value of x_i. More...
|
| |
| void | set (const std::string &key, const std::string &val) |
| | Set "val" to key. More...
|
| |
| const std::string | get (const std::string &key) const |
| | Get the value of key. More...
|
| |
| void | print (const std::string &option="", std::ostream &output_stream=std::cout) const |
| | Output solution in stream "output_stream". More...
|
| |
| void | print (std::ostream &output_stream, const std::string &option="") const |
| | Output solution in stream "output_stream". More...
|
| |
|
| std::unique_ptr< Impl > | pimpl |
| |
Class to store a solution computed by ABS2 QUBO solver.
- Note
- The size of the solution can be changed after the construction
Definition at line 205 of file abs2.hpp.
◆ Sol() [1/4]
| abs2::Sol::Sol |
( |
int |
size | ) |
|
Constructor for a solution with "size" bits.
- Parameters
-
◆ Sol() [2/4]
Construct a new Sol object.
◆ ~Sol()
◆ Sol() [3/4]
| abs2::Sol::Sol |
( |
const Sol & |
sol | ) |
|
Copy constructor. Create a new Sol object from "sol".
- Parameters
-
| sol | Sol object to be copied |
◆ Sol() [4/4]
| abs2::Sol::Sol |
( |
Sol && |
sol | ) |
|
Move constructor. Create a new Sol object from "sol".
- Parameters
-
| sol | Sol object to be moved |
◆ operator=() [1/2]
| Sol& abs2::Sol::operator= |
( |
const Sol & |
sol | ) |
|
Copy assignment of "sol".
- Parameters
-
| sol | Sol object to be copied |
◆ operator=() [2/2]
| Sol& abs2::Sol::operator= |
( |
Sol && |
sol | ) |
|
Move assignment of "sol".
- Parameters
-
| sol | Sol object to be moved |
◆ set() [1/2]
| void abs2::Sol::set |
( |
int |
i, |
|
|
bool |
val |
|
) |
| |
Set "val" to x_i.
- Parameters
-
| i | Index of x |
| val | Value to be set |
◆ get() [1/2]
| bool abs2::Sol::get |
( |
int |
i | ) |
const |
Get the value of x_i.
- Parameters
-
- Returns
- x_i
◆ set() [2/2]
| void abs2::Sol::set |
( |
const std::string & |
key, |
|
|
const std::string & |
val |
|
) |
| |
Set "val" to key.
- Parameters
-
| key | Solution key |
| val | Solution value |
◆ get() [2/2]
| const std::string abs2::Sol::get |
( |
const std::string & |
key | ) |
const |
Get the value of key.
- Parameters
-
- Returns
- Solution value
◆ print() [1/2]
| void abs2::Sol::print |
( |
const std::string & |
option = "", |
|
|
std::ostream & |
output_stream = std::cout |
|
) |
| const |
Output solution in stream "output_stream".
- Parameters
-
| option | Format option |
| output_stream | Output stream |
◆ print() [2/2]
| void abs2::Sol::print |
( |
std::ostream & |
output_stream, |
|
|
const std::string & |
option = "" |
|
) |
| const |
Output solution in stream "output_stream".
- Parameters
-
| option | Format option |
| output_stream | Output stream |
◆ pimpl
| std::unique_ptr<Impl> abs2::Sol::pimpl |
|
private |
The documentation for this class was generated from the following file: