Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::AllSolversRegistry Class Reference

#include <solver_interface.h>

Public Member Functions

 AllSolversRegistry (const AllSolversRegistry &)=delete
 
AllSolversRegistryoperator= (const AllSolversRegistry &)=delete
 
void Register (SolverTypeProto solver_type, SolverInterface::Factory factory)
 
absl::StatusOr< std::unique_ptr< SolverInterface > > Create (SolverTypeProto solver_type, const ModelProto &model, const SolverInterface::InitArgs &init_args) const
 
bool IsRegistered (SolverTypeProto solver_type) const
 Whether a solver type is supported.
 
std::vector< SolverTypeProto > RegisteredSolvers () const
 List all supported solver types.
 
std::string RegisteredSolversToString () const
 Returns a human-readable list of supported solver types.
 

Static Public Member Functions

static AllSolversRegistryInstance ()
 

Detailed Description

Definition at line 157 of file solver_interface.h.

Constructor & Destructor Documentation

◆ AllSolversRegistry()

operations_research::math_opt::AllSolversRegistry::AllSolversRegistry ( const AllSolversRegistry & )
delete

Member Function Documentation

◆ Create()

absl::StatusOr< std::unique_ptr< SolverInterface > > operations_research::math_opt::AllSolversRegistry::Create ( SolverTypeProto solver_type,
const ModelProto & model,
const SolverInterface::InitArgs & init_args ) const

Invokes the factory associated to the solver type with the provided arguments.

Definition at line 57 of file solver_interface.cc.

◆ Instance()

AllSolversRegistry * operations_research::math_opt::AllSolversRegistry::Instance ( )
static

Definition at line 40 of file solver_interface.cc.

◆ IsRegistered()

bool operations_research::math_opt::AllSolversRegistry::IsRegistered ( SolverTypeProto solver_type) const

Whether a solver type is supported.

Definition at line 77 of file solver_interface.cc.

◆ operator=()

AllSolversRegistry & operations_research::math_opt::AllSolversRegistry::operator= ( const AllSolversRegistry & )
delete

◆ Register()

void operations_research::math_opt::AllSolversRegistry::Register ( SolverTypeProto solver_type,
SolverInterface::Factory factory )

Maps the given factory to the given solver type. Calling this twice will result in an error, using static initialization is recommended, e.g. see MATH_OPT_REGISTER_SOLVER defined below.

Required: factory must be threadsafe.

Definition at line 45 of file solver_interface.cc.

◆ RegisteredSolvers()

std::vector< SolverTypeProto > operations_research::math_opt::AllSolversRegistry::RegisteredSolvers ( ) const

List all supported solver types.

Definition at line 82 of file solver_interface.cc.

◆ RegisteredSolversToString()

std::string operations_research::math_opt::AllSolversRegistry::RegisteredSolversToString ( ) const

Returns a human-readable list of supported solver types.

Definition at line 94 of file solver_interface.cc.


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