Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::PermutationCycleHandler< IndexType > Class Template Referenceabstract

#include <permutation.h>

Inheritance diagram for operations_research::PermutationCycleHandler< IndexType >:
operations_research::ArrayIndexCycleHandler< DataType, IndexType >

Public Member Functions

 PermutationCycleHandler (const PermutationCycleHandler &)=delete
 This type is neither copyable nor movable.
 
PermutationCycleHandleroperator= (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 ()
 

Detailed Description

template<typename IndexType>
class operations_research::PermutationCycleHandler< IndexType >

Abstract base class template defining the interface needed by PermutationApplier to handle a single cycle of a permutation.

Definition at line 88 of file permutation.h.

Constructor & Destructor Documentation

◆ PermutationCycleHandler() [1/2]

template<typename IndexType >
operations_research::PermutationCycleHandler< IndexType >::PermutationCycleHandler ( const PermutationCycleHandler< IndexType > & )
delete

This type is neither copyable nor movable.

◆ ~PermutationCycleHandler()

template<typename IndexType >
virtual operations_research::PermutationCycleHandler< IndexType >::~PermutationCycleHandler ( )
inlinevirtual

Definition at line 130 of file permutation.h.

◆ PermutationCycleHandler() [2/2]

template<typename IndexType >
operations_research::PermutationCycleHandler< IndexType >::PermutationCycleHandler ( )
inlineprotected

Definition at line 133 of file permutation.h.

Member Function Documentation

◆ operator=()

template<typename IndexType >
PermutationCycleHandler & operations_research::PermutationCycleHandler< IndexType >::operator= ( const PermutationCycleHandler< IndexType > & )
delete

◆ SetIndexFromIndex()

◆ SetIndexFromTemp()

◆ SetSeen()

template<typename IndexType >
virtual void operations_research::PermutationCycleHandler< IndexType >::SetSeen ( IndexType * unused_permutation_element) const
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 >, operations_research::ArrayIndexCycleHandler< NodeIndexType, ArcIndexType >, and operations_research::EbertGraphBase< NodeIndexType, ArcIndexType, DerivedGraph >::CycleHandlerForAnnotatedArcs.

Definition at line 114 of file permutation.h.

◆ SetTempFromIndex()

◆ Unseen()

template<typename IndexType >
virtual bool operations_research::PermutationCycleHandler< IndexType >::Unseen ( IndexType unused_permutation_element) const
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 >, operations_research::ArrayIndexCycleHandler< NodeIndexType, ArcIndexType >, and operations_research::EbertGraphBase< NodeIndexType, ArcIndexType, DerivedGraph >::CycleHandlerForAnnotatedArcs.

Definition at line 125 of file permutation.h.


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