OR-Tools  9.3
DynamicPartition

Detailed Description

Definition at line 50 of file dynamic_partition.h.

Classes

struct  IterablePart
 

Public Types

enum  DebugStringSorting { SORT_LEXICOGRAPHICALLY , SORT_BY_PART }
 

Public Member Functions

 DynamicPartition (int num_elements)
 
 DynamicPartition (const std::vector< int > &initial_part_of_element)
 
int NumElements () const
 
const int NumParts () const
 
IterablePart ElementsInPart (int i) const
 
int PartOf (int element) const
 
int SizeOfPart (int part) const
 
int ParentOfPart (int part) const
 
IterablePart ElementsInSamePartAs (int i) const
 
uint64_t FprintOfPart (int part) const
 
void Refine (const std::vector< int > &distinguished_subset)
 
void UndoRefineUntilNumPartsEqual (int original_num_parts)
 
std::string DebugString (DebugStringSorting sorting) const
 
const std::vector< int > & ElementsInHierarchicalOrder () const
 

Member Enumeration Documentation

◆ DebugStringSorting

Enumerator
SORT_LEXICOGRAPHICALLY 
SORT_BY_PART 

Definition at line 118 of file dynamic_partition.h.

Constructor & Destructor Documentation

◆ DynamicPartition() [1/2]

DynamicPartition ( int  num_elements)
explicit

Definition at line 32 of file dynamic_partition.cc.

◆ DynamicPartition() [2/2]

DynamicPartition ( const std::vector< int > &  initial_part_of_element)
explicit

Definition at line 48 of file dynamic_partition.cc.

Member Function Documentation

◆ DebugString()

std::string DebugString ( DebugStringSorting  sorting) const

Definition at line 185 of file dynamic_partition.cc.

◆ ElementsInHierarchicalOrder()

const std::vector< int > & ElementsInHierarchicalOrder ( ) const
inline

Definition at line 137 of file dynamic_partition.h.

◆ ElementsInPart()

DynamicPartition::IterablePart ElementsInPart ( int  i) const
inline

Definition at line 277 of file dynamic_partition.h.

◆ ElementsInSamePartAs()

DynamicPartition::IterablePart ElementsInSamePartAs ( int  i) const
inline

Definition at line 304 of file dynamic_partition.h.

◆ FprintOfPart()

uint64_t FprintOfPart ( int  part) const
inline

Definition at line 309 of file dynamic_partition.h.

◆ NumElements()

int NumElements ( ) const
inline

Definition at line 61 of file dynamic_partition.h.

◆ NumParts()

const int NumParts ( ) const
inline

Definition at line 62 of file dynamic_partition.h.

◆ ParentOfPart()

int ParentOfPart ( int  part) const
inline

Definition at line 298 of file dynamic_partition.h.

◆ PartOf()

int PartOf ( int  element) const
inline

Definition at line 285 of file dynamic_partition.h.

◆ Refine()

void Refine ( const std::vector< int > &  distinguished_subset)

Definition at line 97 of file dynamic_partition.cc.

◆ SizeOfPart()

int SizeOfPart ( int  part) const
inline

Definition at line 291 of file dynamic_partition.h.

◆ UndoRefineUntilNumPartsEqual()

void UndoRefineUntilNumPartsEqual ( int  original_num_parts)

Definition at line 162 of file dynamic_partition.cc.


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