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

A class for defining the ABS2 callback function. More...

#include <qbpp_abs2.hpp>

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

Public Member Functions

 Callback (const QuadModel &quad_model)
 Construct a new Callback object. More...
 
virtual ~Callback ()=default
 Destructor for deleting a callback object. More...
 
Sol get_sol () const
 Get the solution from the ABS2 solver. More...
 
void set_hint (const Sol &hint)
 Provide a hint solution to the ABS2 solver. More...
 
virtual void callback (const std::string &event)
 The default callback function for ABS2 QUBO solver. More...
 
void set (const std::string &operation)
 Set the operation to the ABS2 Callback. More...
 
void set (const std::string &operation, const std::string &operand)
 Set the operation and operand to the ABS2 Callback. More...
 
void set (const Sol &hint)
 Provide a hint solution to the ABS2 solver. More...
 
const Solget () const
 Get the current solution. More...
 

Protected Attributes

const QuadModel quad_model
 QuadModel object created by QUBO++ library. More...
 

Private Attributes

std::shared_ptr< Impl > pimpl
 

Detailed Description

A class for defining the ABS2 callback function.

This class is derived from abs2::Callback and containing a qbpp::QuadModel object.

Definition at line 204 of file qbpp_abs2.hpp.

Member Function Documentation

◆ set() [1/3]

void abs2::Callback::set ( const std::string &  operation)
inherited

Set the operation to the ABS2 Callback.

Parameters
operationOperation string

Set the operation to the ABS2 Callback.

Here is the caller graph for this function:

◆ set() [2/3]

void abs2::Callback::set ( const std::string &  operation,
const std::string &  operand 
)
inherited

Set the operation and operand to the ABS2 Callback.

Parameters
operationOperation string
operandOperand string

Set the operation and operand to the ABS2 Callback.

◆ set() [3/3]

void abs2::Callback::set ( const Sol hint)
inherited

Provide a hint solution to the ABS2 solver.

Parameters
hintHint solution

Provide a hint solution will be used by the ABS2 solver to improve the solution.

◆ get()

const Sol& abs2::Callback::get ( ) const
inherited

Get the current solution.

Here is the caller graph for this function:

Member Data Documentation

◆ quad_model

const QuadModel qbpp_abs2::Callback::quad_model
protected

QuadModel object created by QUBO++ library.

Definition at line 207 of file qbpp_abs2.hpp.

◆ pimpl

std::shared_ptr<Impl> abs2::Callback::pimpl
privateinherited

Definition at line 288 of file abs2.hpp.


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