C++ Reference
C++ Reference: Routing
Detailed Description
template<class V, class E>
class operations_research::AssignmentContainer< V, E >
Definition at line 4771 of file constraint_solver.h.
Public Member Functions | |
| AssignmentContainer () | |
| E * | Add (V *var) |
| E * | FastAdd (V *var) |
| Adds element without checking its presence in the container. More... | |
| E * | AddAtPosition (V *var, int position) |
| Advanced usage: Adds element at a given position; position has to have been allocated with AssignmentContainer::Resize() beforehand. More... | |
| void | Clear () |
| void | Resize (size_t size) |
| Advanced usage: Resizes the container, potentially adding elements with null variables. More... | |
| bool | Empty () const |
| void | CopyIntersection (const AssignmentContainer< V, E > &container) |
| Copies the elements of 'container' which are already in the calling container. More... | |
| void | Copy (const AssignmentContainer< V, E > &container) |
| Copies all the elements of 'container' to this container, clearing its previous content. More... | |
| bool | Contains (const V *const var) const |
| E * | MutableElement (const V *const var) |
| E * | MutableElementOrNull (const V *const var) |
| const E & | Element (const V *const var) const |
| const E * | ElementPtrOrNull (const V *const var) const |
| const std::vector< E > & | elements () const |
| E * | MutableElement (int index) |
| const E & | Element (int index) const |
| int | Size () const |
| void | Store () |
| void | Restore () |
| bool | AreAllElementsBound () const |
| bool | operator== (const AssignmentContainer< V, E > &container) const |
| Returns true if this and 'container' both represent the same V* -> E map. More... | |
| bool | operator!= (const AssignmentContainer< V, E > &container) const |
Constructor & Destructor Documentation
◆ AssignmentContainer()
|
inline |
Definition at line 4773 of file constraint_solver.h.
Member Function Documentation
◆ Add()
|
inline |
Definition at line 4774 of file constraint_solver.h.
◆ AddAtPosition()
|
inline |
Advanced usage: Adds element at a given position; position has to have been allocated with AssignmentContainer::Resize() beforehand.
Definition at line 4791 of file constraint_solver.h.
◆ AreAllElementsBound()
|
inline |
Definition at line 4882 of file constraint_solver.h.
◆ Clear()
|
inline |
2x speedup on OR-tools.
Definition at line 4795 of file constraint_solver.h.
◆ Contains()
|
inline |
Definition at line 4836 of file constraint_solver.h.
◆ Copy()
|
inline |
Copies all the elements of 'container' to this container, clearing its previous content.
Definition at line 4829 of file constraint_solver.h.
◆ CopyIntersection()
|
inline |
Copies the elements of 'container' which are already in the calling container.
Definition at line 4807 of file constraint_solver.h.
◆ Element() [1/2]
|
inline |
Definition at line 4853 of file constraint_solver.h.
◆ Element() [2/2]
|
inline |
Definition at line 4868 of file constraint_solver.h.
◆ ElementPtrOrNull()
|
inline |
Definition at line 4859 of file constraint_solver.h.
◆ elements()
|
inline |
Definition at line 4866 of file constraint_solver.h.
◆ Empty()
|
inline |
Definition at line 4804 of file constraint_solver.h.
◆ FastAdd()
|
inline |
Adds element without checking its presence in the container.
Definition at line 4784 of file constraint_solver.h.
◆ MutableElement() [1/2]
|
inline |
Definition at line 4840 of file constraint_solver.h.
◆ MutableElement() [2/2]
|
inline |
Definition at line 4867 of file constraint_solver.h.
◆ MutableElementOrNull()
|
inline |
Definition at line 4846 of file constraint_solver.h.
◆ operator!=()
|
inline |
Definition at line 4911 of file constraint_solver.h.
◆ operator==()
|
inline |
Returns true if this and 'container' both represent the same V* -> E map.
Runs in linear time; requires that the == operator on the type E is well defined.
We may not have any work to do
The == should be order-independent
Do not use the hash_map::== operator! It compares both content and how the map is hashed (e.g., number of buckets). This is not what we want.
Definition at line 4892 of file constraint_solver.h.
◆ Resize()
|
inline |
Advanced usage: Resizes the container, potentially adding elements with null variables.
Definition at line 4803 of file constraint_solver.h.
◆ Restore()
|
inline |
Definition at line 4875 of file constraint_solver.h.
◆ Size()
|
inline |
Definition at line 4869 of file constraint_solver.h.
◆ Store()
|
inline |
Definition at line 4870 of file constraint_solver.h.
The documentation for this class was generated from the following file: