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
abs2::Solver Class Reference

Class to configure the ABS2 QUBO solver. More...

#include <abs2.hpp>

Inheritance diagram for abs2::Solver:
Inheritance graph
[legend]

Public Member Functions

 Solver (bool verbose=true)
 Constructor for the ABS2 QUBO solver. More...
 
 ~Solver ()
 Destructor for the ABS2 QUBO solver. More...
 
std::string get (const std::string &key)
 Retrieves the solver attribute value associated with the given key. More...
 
void print (const std::string &option="", std::ostream &output_stream=std::cout) const
 Outputs the solver attribute value in the specified format. More...
 
void print (std::ostream &output_stream, const std::string &option="") const
 Outputs the solver attribute value in the specified format. More...
 
Sol operator() (const Model &model, const Param &param) const
 Executes the ABS2 solver for the given model and parameters, returning the solution. More...
 
Sol operator() (const Model &model, const Param &param, const Sol &start) const
 Executes the ABS2 solver for the given model, parameters, and initial solution, returning the solution. More...
 

Private Attributes

Impl * pimpl
 

Detailed Description

Class to configure the ABS2 QUBO solver.

This class is used to check available GPUs and verify the installation of the ABS2 QUBO solver shared libraries.

Definition at line 43 of file abs2.hpp.

Constructor & Destructor Documentation

◆ Solver()

abs2::Solver::Solver ( bool  verbose = true)

Constructor for the ABS2 QUBO solver.

Parameters
verboseIf true, displays license information.

◆ ~Solver()

abs2::Solver::~Solver ( )

Destructor for the ABS2 QUBO solver.

Member Function Documentation

◆ get()

std::string abs2::Solver::get ( const std::string &  key)

Retrieves the solver attribute value associated with the given key.

Parameters
keyThe attribute key.
Returns
The attribute value as a string.

◆ print() [1/2]

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

Outputs the solver attribute value in the specified format.

Parameters
optionThe format option.
output_streamThe output stream to write to. Defaults to std::cout.

◆ print() [2/2]

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

Outputs the solver attribute value in the specified format.

Parameters
output_streamThe output stream to write to.
optionThe format option. Defaults to an empty string.

◆ operator()() [1/2]

Sol abs2::Solver::operator() ( const Model model,
const Param param 
) const

Executes the ABS2 solver for the given model and parameters, returning the solution.

Parameters
modelThe QUBO model.
paramThe ABS2 solver parameters.
Returns
The solution as a Sol object.

◆ operator()() [2/2]

Sol abs2::Solver::operator() ( const Model model,
const Param param,
const Sol start 
) const

Executes the ABS2 solver for the given model, parameters, and initial solution, returning the solution.

Parameters
modelThe QUBO model.
paramThe ABS2 solver parameters.
startThe initial solution.
Returns
The solution as a Sol object.

Member Data Documentation

◆ pimpl

Impl* abs2::Solver::pimpl
private

Definition at line 87 of file abs2.hpp.


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