Identifies a SolverInterface implementation.
A moved-from instance is guaranteed to be empty and will not compare equal to any non-empty ID.
#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 | |
SolverId & | operator= (const SolverId &)=default |
SolverId (SolverId &&)=default | |
SolverId & | operator= (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 &) |
|
default |
|
explicit |
Constructs a specific, known solver type.
Internally, a hidden integer is allocated and assigned to this instance; all instances that share an integer (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.
For best performance, choose a name that is 15 characters or less, so that it fits within the libstdc++ "small string" optimization ("SSO").
const std::string& name | ( | ) | const |
|
friend |
Implements the hash_append generic hashing concept.
|
friend |