Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <constraint_solver.h>
Public Member Functions | |
AssignmentContainer () | |
E * | Add (V *var) |
E * | FastAdd (V *var) |
Adds element without checking its presence in the container. | |
E * | AddAtPosition (V *var, int position) |
void | Clear () |
void | Resize (size_t size) |
bool | Empty () const |
void | CopyIntersection (const AssignmentContainer< V, E > &container) |
void | Copy (const AssignmentContainer< V, E > &container) |
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 |
bool | operator!= (const AssignmentContainer< V, E > &container) const |
Definition at line 5253 of file constraint_solver.h.
|
inline |
Definition at line 5255 of file constraint_solver.h.
|
inline |
Definition at line 5256 of file constraint_solver.h.
|
inline |
Advanced usage: Adds element at a given position; position has to have been allocated with AssignmentContainer::Resize() beforehand.
Definition at line 5273 of file constraint_solver.h.
|
inline |
Definition at line 5364 of file constraint_solver.h.
|
inline |
2x speedup on OR-Tools.
Definition at line 5277 of file constraint_solver.h.
|
inline |
Definition at line 5318 of file constraint_solver.h.
|
inline |
Copies all the elements of 'container' to this container, clearing its previous content.
Definition at line 5311 of file constraint_solver.h.
|
inline |
Copies the elements of 'container' which are already in the calling container.
Definition at line 5289 of file constraint_solver.h.
|
inline |
Definition at line 5335 of file constraint_solver.h.
|
inline |
Definition at line 5350 of file constraint_solver.h.
|
inline |
Definition at line 5341 of file constraint_solver.h.
|
inline |
Definition at line 5348 of file constraint_solver.h.
|
inline |
Definition at line 5286 of file constraint_solver.h.
|
inline |
Adds element without checking its presence in the container.
Definition at line 5266 of file constraint_solver.h.
|
inline |
Definition at line 5322 of file constraint_solver.h.
|
inline |
Definition at line 5349 of file constraint_solver.h.
|
inline |
Definition at line 5328 of file constraint_solver.h.
|
inline |
Definition at line 5393 of file constraint_solver.h.
|
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 5374 of file constraint_solver.h.
|
inline |
Advanced usage: Resizes the container, potentially adding elements with null variables.
Definition at line 5285 of file constraint_solver.h.
|
inline |
Definition at line 5357 of file constraint_solver.h.
|
inline |
Definition at line 5351 of file constraint_solver.h.
|
inline |
Definition at line 5352 of file constraint_solver.h.