Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <permutation.h>
Public Member Functions | |
ArrayIndexCycleHandler (DataType *data) | |
ArrayIndexCycleHandler (const ArrayIndexCycleHandler &)=delete | |
This type is neither copyable nor movable. | |
ArrayIndexCycleHandler & | operator= (const ArrayIndexCycleHandler &)=delete |
void | SetTempFromIndex (IndexType source) override |
void | SetIndexFromIndex (IndexType source, IndexType destination) const override |
Moves a data element one step along its cycle. | |
void | SetIndexFromTemp (IndexType destination) const override |
Sets a data element from the temporary. | |
void | SetSeen (IndexType *permutation_element) const override |
bool | Unseen (IndexType permutation_element) const override |
Public Member Functions inherited from operations_research::PermutationCycleHandler< IndexType > | |
PermutationCycleHandler (const PermutationCycleHandler &)=delete | |
This type is neither copyable nor movable. | |
PermutationCycleHandler & | operator= (const PermutationCycleHandler &)=delete |
virtual | ~PermutationCycleHandler () |
Additional Inherited Members | |
Protected Member Functions inherited from operations_research::PermutationCycleHandler< IndexType > | |
PermutationCycleHandler () | |
A generic cycle handler class for the common case in which the object to be permuted is indexable with T& operator[](int), and the permutation is represented by a mutable array of nonnegative int-typed index values. To mark a permutation element as seen, we replace it by its ones-complement value.
Definition at line 142 of file permutation.h.
|
inlineexplicit |
Definition at line 144 of file permutation.h.
|
delete |
This type is neither copyable nor movable.
|
delete |
|
inlineoverridevirtual |
Moves a data element one step along its cycle.
Implements operations_research::PermutationCycleHandler< IndexType >.
Reimplemented in operations_research::ForwardStaticGraph< NodeIndexType, ArcIndexType >::CycleHandlerForAnnotatedArcs.
Definition at line 151 of file permutation.h.
|
inlineoverridevirtual |
Sets a data element from the temporary.
Implements operations_research::PermutationCycleHandler< IndexType >.
Reimplemented in operations_research::ForwardStaticGraph< NodeIndexType, ArcIndexType >::CycleHandlerForAnnotatedArcs.
Definition at line 155 of file permutation.h.
|
inlineoverridevirtual |
Marks an element of the permutation as handled by PermutationHandler::Apply(), meaning that we have read the corresponding value from the data to be permuted, and put that value somewhere (either in the temp or in its ultimate destination in the data.
This method must be overridden in implementations where it is called. If an implementation doesn't call it, no need to override.
Reimplemented from operations_research::PermutationCycleHandler< IndexType >.
Definition at line 158 of file permutation.h.
|
inlineoverridevirtual |
Sets the internal temporary storage from the given index in the underlying container(s).
Implements operations_research::PermutationCycleHandler< IndexType >.
Reimplemented in operations_research::ForwardStaticGraph< NodeIndexType, ArcIndexType >::CycleHandlerForAnnotatedArcs.
Definition at line 150 of file permutation.h.
|
inlineoverridevirtual |
Returns true iff the given element of the permutation is unseen, meaning that it has not yet been handled by PermutationApplier::Apply().
This method must be overridden in implementations where it is called. If an implementation doesn't call it, no need to override.
Reimplemented from operations_research::PermutationCycleHandler< IndexType >.
Definition at line 161 of file permutation.h.