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

A class for setting parameters for the ABS2 QUBO solver. More...

#include <qbpp_abs2.hpp>

Inheritance diagram for qbpp_abs2::Param:
Inheritance graph
[legend]
Collaboration diagram for qbpp_abs2::Param:
Collaboration graph
[legend]

Public Member Functions

 Param ()=default
 Construct a new Param object from a QuadModel object. More...
 
void set_target_energy (qbpp::energy_t target_energy)
 Set the target energy for ABS2 QUBO solver. More...
 
std::optional< qbpp::energy_tget_target_energy () const
 Get the target energy for ABS2 QUBO solver. More...
 
void set_time_limit (uint32_t time_limit)
 Set the time limit for ABS2 QUBO solver. More...
 
void set_arithmetic_bits (uint32_t bits)
 Set the arithmetic bits. More...
 
void set (const std::string &key, const std::string &val)
 Set "val" to "key". More...
 
void set (Callback &callback)
 Set Callback function to ABS2. More...
 
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 parameters in stream "output_stream". More...
 
void print (std::ostream &output_stream, const std::string &option="") const
 Output parameters in stream "output_stream". More...
 

Private Attributes

std::optional< qbpp::energy_ttarget_energy
 The target energy given by C++ library. More...
 
std::unique_ptr< Impl > pimpl
 

Detailed Description

A class for setting parameters for the ABS2 QUBO solver.

This class is derived from abs2::Param.

Note
This class stores the target_energy qbpp::Expr object, which includes a constant term. Since the ABS2 QUBO solver does not handle constant terms, the target_energy passed to the ABS2 solver must be adjusted and set accordingly when the ABS2 solver is called.

Definition at line 104 of file qbpp_abs2.hpp.

Member Function Documentation

◆ set() [1/2]

void abs2::Param::set ( const std::string &  key,
const std::string &  val 
)
inherited

Set "val" to "key".

Parameters
keyParameter key
valParameter value
Here is the caller graph for this function:

◆ set() [2/2]

void abs2::Param::set ( Callback callback)
inherited

Set Callback function to ABS2.

Parameters
callbackCallback class object that includes user-defined callback function

The callback function in the class object "callback" is called during the optimization process of ABS2.

◆ get()

std::string abs2::Param::get ( const std::string &  key) const
inherited

Get the value of "key".

Parameters
keyParameter key
Returns
Parameter value

◆ print() [1/2]

void abs2::Param::print ( const std::string &  option = "",
std::ostream &  output_stream = std::cout 
) const
inherited

Output parameters in stream "output_stream".

Parameters
optionFormat option
output_streamOutput stream

◆ print() [2/2]

void abs2::Param::print ( std::ostream &  output_stream,
const std::string &  option = "" 
) const
inherited

Output parameters in stream "output_stream".

Parameters
output_streamOutput stream
optionFormat option

Member Data Documentation

◆ target_energy

std::optional<qbpp::energy_t> qbpp_abs2::Param::target_energy
private

The target energy given by C++ library.

Note
ABS2 QUBO solver has no constant term, the target_value must be set when ABS2 solver is called.

Definition at line 108 of file qbpp_abs2.hpp.

◆ pimpl

std::unique_ptr<Impl> abs2::Param::pimpl
privateinherited

Definition at line 201 of file abs2.hpp.


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