Google OR-Tools: operations_research::AssignmentContainer< V, E

template<class V, class E>
class operations_research::AssignmentContainer< V, E >

Definition at line 5381 of file constraint_solver.h.

#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

template<class V, class E>

◆ Add()

template<class V, class E>

◆ AddAtPosition()

template<class V, class E>

Advanced usage: Adds element at a given position; position has to have been allocated with AssignmentContainer::Resize() beforehand.

Definition at line 5401 of file constraint_solver.h.

◆ AreAllElementsBound()

template<class V, class E>

◆ Clear()

template<class V, class E>

◆ Contains()

template<class V, class E>

◆ Copy()

template<class V, class E>

Copies all the elements of 'container' to this container, clearing its previous content.

Definition at line 5439 of file constraint_solver.h.

◆ CopyIntersection()

template<class V, class E>

Copies the elements of 'container' which are already in the calling container.

Definition at line 5417 of file constraint_solver.h.

◆ Element() [1/2]

template<class V, class E>

◆ Element() [2/2]

template<class V, class E>

◆ ElementPtrOrNull()

template<class V, class E>

◆ elements()

template<class V, class E>

◆ Empty()

template<class V, class E>

◆ FastAdd()

template<class V, class E>

◆ MutableElement() [1/2]

template<class V, class E>

◆ MutableElement() [2/2]

template<class V, class E>

◆ MutableElementOrNull()

template<class V, class E>

◆ operator!=()

template<class V, class E>

◆ operator==()

template<class V, class E>

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 5501 of file constraint_solver.h.

◆ Resize()

template<class V, class E>

Advanced usage: Resizes the container, potentially adding elements with null variables.

Definition at line 5413 of file constraint_solver.h.

◆ Restore()

template<class V, class E>

◆ Size()

template<class V, class E>

◆ Store()

template<class V, class E>


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