![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
A strongly typed element id. Value type. More...
#include <elements.h>
Public Types | |
using | ValueType = int64_t |
Public Member Functions | |
constexpr | ElementId () |
Constructs an invalid element id. | |
constexpr | ElementId (int64_t id) |
Constructs a valid element id. DCHECKs that id is non-negative. | |
constexpr bool | IsValid () const |
int64_t | value () const |
Returns the raw id value. | |
ElementId | Next () const |
ElementId | operator++ () |
Static Public Member Functions | |
static constexpr ElementType | type () |
Friends | |
bool | operator== (const ElementId &lhs, const ElementId &rhs) |
bool | operator!= (const ElementId &lhs, const ElementId &rhs) |
bool | operator< (const ElementId &lhs, const ElementId &rhs) |
bool | operator<= (const ElementId &lhs, const ElementId &rhs) |
bool | operator> (const ElementId &lhs, const ElementId &rhs) |
bool | operator>= (const ElementId &lhs, const ElementId &rhs) |
template<typename H> | |
H | AbslHashValue (H h, const ElementId &a) |
A strongly typed element id. Value type.
Definition at line 64 of file elements.h.
using operations_research::math_opt::ElementId< element_type >::ValueType = int64_t |
Definition at line 125 of file elements.h.
|
inlineconstexpr |
Constructs an invalid element id.
Definition at line 67 of file elements.h.
|
inlineexplicitconstexpr |
Constructs a valid element id. DCHECKs that id is non-negative.
Definition at line 70 of file elements.h.
|
inlineconstexpr |
Definition at line 74 of file elements.h.
|
inline |
We don't support addition between ElementIds: what does it mean to add indices ? We do support getting the next element id though.
Definition at line 107 of file elements.h.
|
inline |
MakeStrongIntRange() relies on operator++ being present. Prefer the more explicit Next() in general.
Definition at line 114 of file elements.h.
|
inlinestaticconstexpr |
Definition at line 79 of file elements.h.
|
inline |
Returns the raw id value.
Definition at line 77 of file elements.h.
|
friend |
Definition at line 121 of file elements.h.
|
friend |
Definition at line 85 of file elements.h.
|
friend |
Definition at line 89 of file elements.h.
|
friend |
Definition at line 93 of file elements.h.
|
friend |
Definition at line 81 of file elements.h.
|
friend |
Definition at line 97 of file elements.h.
|
friend |
Definition at line 101 of file elements.h.