![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Abstract base class template defining the interface needed by PermutationApplier to handle a single cycle of a permutation.
Definition at line 87 of file permutation.h.
#include <permutation.h>
Public Member Functions | |
PermutationCycleHandler (const PermutationCycleHandler &)=delete | |
This type is neither copyable nor movable. | |
PermutationCycleHandler & | operator= (const PermutationCycleHandler &)=delete |
virtual void | SetTempFromIndex (IndexType source)=0 |
virtual void | SetIndexFromIndex (IndexType source, IndexType destination) const =0 |
Moves a data element one step along its cycle. | |
virtual void | SetIndexFromTemp (IndexType destination) const =0 |
Sets a data element from the temporary. | |
virtual void | SetSeen (IndexType *unused_permutation_element) const |
virtual bool | Unseen (IndexType unused_permutation_element) const |
virtual | ~PermutationCycleHandler () |
Protected Member Functions | |
PermutationCycleHandler () |
|
delete |
This type is neither copyable nor movable.
|
inlinevirtual |
Definition at line 129 of file permutation.h.
|
inlineprotected |
Definition at line 132 of file permutation.h.
|
delete |
|
pure virtual |
Moves a data element one step along its cycle.
Implemented in operations_research::ArrayIndexCycleHandler< DataType, IndexType >, and operations_research::CostValueCycleHandler< ArcIndexType, CostValue >.
|
pure virtual |
Sets a data element from the temporary.
Implemented in operations_research::ArrayIndexCycleHandler< DataType, IndexType >, and operations_research::CostValueCycleHandler< ArcIndexType, CostValue >.
|
inlinevirtual |
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 in operations_research::ArrayIndexCycleHandler< DataType, IndexType >.
Definition at line 113 of file permutation.h.
|
pure virtual |
Sets the internal temporary storage from the given index in the underlying container(s).
Implemented in operations_research::ArrayIndexCycleHandler< DataType, IndexType >, and operations_research::CostValueCycleHandler< ArcIndexType, CostValue >.
|
inlinevirtual |
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 in operations_research::ArrayIndexCycleHandler< DataType, IndexType >.
Definition at line 124 of file permutation.h.