QUBO++ Library with QUBO Solver APIs
Author: Koji Nakano, License: Non-commercial research and evaluation purposes without any guarantees.
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
MyEasySolver Class Reference
Inheritance diagram for MyEasySolver:
Inheritance graph
[legend]
Collaboration diagram for MyEasySolver:
Collaboration graph
[legend]

Public Member Functions

 MyEasySolver (const qbpp::tsp::TSPQuadModel &tsp_quad_model)
 
void callback (const qbpp::Sol &sol, double tts) const override
 
const qbpp::QuadModelget_quad_model () const
 
const std::optional< uint32_t > get_time_limit () const
 
const std::optional< energy_t > get_target_energy () const
 
const std::shared_ptr< qbpp::SolHolderget_sol_holder_ptr () const
 
vindex_t var_count () const
 
void set_time_limit (uint32_t limit)
 
void set_target_energy (energy_t energy)
 
void set_thread_count (unsigned int count)
 
size_t get_thread_count ()
 
qbpp::Sol get_sol () const
 
double get_tts () const
 
void enable_default_callback ()
 
qbpp::Sol search ()
 

Protected Member Functions

void single_search (size_t thread_id)
 

Protected Attributes

const qbpp::QuadModel quad_model_
 
std::optional< uint32_t > time_limit_
 
size_t thread_count_
 
std::optional< energy_t > target_energy_
 
const std::shared_ptr< qbpp::SolHoldersol_holder_ptr_
 
std::mutex callback_mutex_
 
bool enable_default_callback_ = false
 
double start_time_
 
std::optional< energy_t > prev_energy_ = std::nullopt
 

Private Attributes

const qbpp::tsp::TSPQuadModeltsp_quad_model
 

Detailed Description

Definition at line 16 of file tsp_easy.cpp.

Constructor & Destructor Documentation

◆ MyEasySolver()

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

Definition at line 20 of file tsp_easy.cpp.

Member Function Documentation

◆ callback()

void MyEasySolver::callback ( const qbpp::Sol sol,
double  tts 
) const
inlineoverridevirtual

Reimplemented from qbpp::easy_solver::EasySolver.

Definition at line 24 of file tsp_easy.cpp.

Here is the call graph for this function:

◆ single_search()

void qbpp::easy_solver::EasySolver::single_search ( size_t  thread_id)
inlineprotectedinherited

Definition at line 564 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_quad_model()

const qbpp::QuadModel& qbpp::easy_solver::EasySolver::get_quad_model ( ) const
inlineinherited

Definition at line 356 of file qbpp_easy_solver.hpp.

◆ get_time_limit()

const std::optional<uint32_t> qbpp::easy_solver::EasySolver::get_time_limit ( ) const
inlineinherited

Definition at line 358 of file qbpp_easy_solver.hpp.

◆ get_target_energy()

const std::optional<energy_t> qbpp::easy_solver::EasySolver::get_target_energy ( ) const
inlineinherited

Definition at line 360 of file qbpp_easy_solver.hpp.

Here is the caller graph for this function:

◆ get_sol_holder_ptr()

const std::shared_ptr<qbpp::SolHolder> qbpp::easy_solver::EasySolver::get_sol_holder_ptr ( ) const
inlineinherited

Definition at line 364 of file qbpp_easy_solver.hpp.

◆ var_count()

vindex_t qbpp::easy_solver::EasySolver::var_count ( ) const
inlineinherited

Definition at line 368 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_time_limit()

void qbpp::easy_solver::EasySolver::set_time_limit ( uint32_t  limit)
inlineinherited

Definition at line 370 of file qbpp_easy_solver.hpp.

Here is the caller graph for this function:

◆ set_target_energy()

void qbpp::easy_solver::EasySolver::set_target_energy ( energy_t  energy)
inlineinherited

Definition at line 372 of file qbpp_easy_solver.hpp.

Here is the caller graph for this function:

◆ set_thread_count()

void qbpp::easy_solver::EasySolver::set_thread_count ( unsigned int  count)
inlineinherited

Definition at line 374 of file qbpp_easy_solver.hpp.

◆ get_thread_count()

size_t qbpp::easy_solver::EasySolver::get_thread_count ( )
inlineinherited

Definition at line 376 of file qbpp_easy_solver.hpp.

◆ get_sol()

qbpp::Sol qbpp::easy_solver::EasySolver::get_sol ( ) const
inlineinherited

Definition at line 378 of file qbpp_easy_solver.hpp.

◆ get_tts()

double qbpp::easy_solver::EasySolver::get_tts ( ) const
inlineinherited

Definition at line 380 of file qbpp_easy_solver.hpp.

◆ enable_default_callback()

void qbpp::easy_solver::EasySolver::enable_default_callback ( )
inlineinherited

Definition at line 382 of file qbpp_easy_solver.hpp.

Here is the caller graph for this function:

◆ search()

qbpp::Sol qbpp::easy_solver::EasySolver::search ( )
inlineinherited

Definition at line 595 of file qbpp_easy_solver.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ tsp_quad_model

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

Definition at line 17 of file tsp_easy.cpp.

◆ quad_model_

const qbpp::QuadModel qbpp::easy_solver::EasySolver::quad_model_
protectedinherited

Definition at line 322 of file qbpp_easy_solver.hpp.

◆ time_limit_

std::optional<uint32_t> qbpp::easy_solver::EasySolver::time_limit_
protectedinherited

Definition at line 324 of file qbpp_easy_solver.hpp.

◆ thread_count_

size_t qbpp::easy_solver::EasySolver::thread_count_
protectedinherited
Initial value:
{std::thread::hardware_concurrency() < 4
? 4
: std::thread::hardware_concurrency()}

Definition at line 326 of file qbpp_easy_solver.hpp.

◆ target_energy_

std::optional<energy_t> qbpp::easy_solver::EasySolver::target_energy_
protectedinherited

Definition at line 330 of file qbpp_easy_solver.hpp.

◆ sol_holder_ptr_

const std::shared_ptr<qbpp::SolHolder> qbpp::easy_solver::EasySolver::sol_holder_ptr_
protectedinherited

Definition at line 332 of file qbpp_easy_solver.hpp.

◆ callback_mutex_

std::mutex qbpp::easy_solver::EasySolver::callback_mutex_
mutableprotectedinherited

Definition at line 334 of file qbpp_easy_solver.hpp.

◆ enable_default_callback_

bool qbpp::easy_solver::EasySolver::enable_default_callback_ = false
protectedinherited

Definition at line 336 of file qbpp_easy_solver.hpp.

◆ start_time_

double qbpp::easy_solver::EasySolver::start_time_
protectedinherited

Definition at line 340 of file qbpp_easy_solver.hpp.

◆ prev_energy_

std::optional<energy_t> qbpp::easy_solver::EasySolver::prev_energy_ = std::nullopt
mutableprotectedinherited

Definition at line 342 of file qbpp_easy_solver.hpp.


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