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
ABS2Callback Class Reference

Class to define ABS2 callback function for factorization. More...

Inheritance diagram for ABS2Callback:
Inheritance graph
[legend]
Collaboration diagram for ABS2Callback:
Collaboration graph
[legend]

Public Member Functions

 ABS2Callback (const qbpp::tsp::TSPQuadModel &tsp_quad_model)
 Construct a new ABS2 callback object. More...
 
void callback (const std::string &event) override
 Callback function for ABS2 solver. 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...
 
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 Sol & get () const
 Get the current solution. More...
 

Protected Attributes

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

Private Attributes

const qbpp::tsp::TSPQuadModeltsp_quad_model
 The TSP expression. More...
 
std::shared_ptr< Impl > pimpl
 

Detailed Description

Class to define ABS2 callback function for factorization.

Definition at line 17 of file tsp_abs2.cpp.

Constructor & Destructor Documentation

◆ ABS2Callback()

ABS2Callback::ABS2Callback ( const qbpp::tsp::TSPQuadModel tsp_quad_model)
inline

Construct a new ABS2 callback object.

Parameters
tsp_quad_modelThe TSP QuadModel.

Definition at line 24 of file tsp_abs2.cpp.

Member Function Documentation

◆ callback()

void ABS2Callback::callback ( const std::string &  event)
inlineoverridevirtual

Callback function for ABS2 solver.

Parameters
eventThe event name.

Reimplemented from qbpp_abs2::Callback.

Definition at line 29 of file tsp_abs2.cpp.

Here is the call graph for this function:

◆ 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

◆ tsp_quad_model

const qbpp::tsp::TSPQuadModel& ABS2Callback::tsp_quad_model
private

The TSP expression.

Definition at line 19 of file tsp_abs2.cpp.

◆ quad_model

const QuadModel qbpp_abs2::Callback::quad_model
protectedinherited

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: