Drake
SolverId Class Reference

Identifies a MathematicalProgramSolverInterface implementation. More...

#include <drake/solvers/solver_id.h>

Public Member Functions

 ~SolverId ()=default
 
 SolverId (std::string name)
 Constructs a specific, known solver type. More...
 
const std::string & name () const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 SolverId (const SolverId &)=default
 
SolverIdoperator= (const SolverId &)=default
 
 SolverId (SolverId &&)=default
 
SolverIdoperator= (SolverId &&)=default
 

Friends

struct std::less< SolverId >
 
template<class HashAlgorithm >
void hash_append (HashAlgorithm &hasher, const SolverId &item) noexcept
 Implements the hash_append generic hashing concept. More...
 
bool operator== (const SolverId &, const SolverId &)
 
bool operator!= (const SolverId &, const SolverId &)
 

Detailed Description

Identifies a MathematicalProgramSolverInterface implementation.

A moved-from instance is guaranteed to be empty and will not compare equal to any non-empty ID.

Constructor & Destructor Documentation

◆ SolverId() [1/3]

SolverId ( const SolverId )
default

◆ SolverId() [2/3]

SolverId ( SolverId &&  )
default

◆ ~SolverId()

~SolverId ( )
default

◆ SolverId() [3/3]

SolverId ( std::string  name)
explicit

Constructs a specific, known solver type.

Internally, a hidden identifier is allocated and assigned to this instance; all instances that share an identifier (including copies of this instance) are considered equal. The solver names are not enforced to be unique, though we recommend that they remain so in practice.

Member Function Documentation

◆ name()

const std::string& name ( ) const
inline

◆ operator=() [1/2]

SolverId& operator= ( const SolverId )
default

◆ operator=() [2/2]

SolverId& operator= ( SolverId &&  )
default

Friends And Related Function Documentation

◆ hash_append

void hash_append ( HashAlgorithm &  hasher,
const SolverId item 
)
friend

Implements the hash_append generic hashing concept.

◆ operator!=

bool operator!= ( const SolverId ,
const SolverId  
)
friend

◆ operator==

bool operator== ( const SolverId ,
const SolverId  
)
friend

◆ std::less< SolverId >

friend struct std::less< SolverId >
friend

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