OR-Tools  9.6
DenseIntTopologicalSorterTpl< stable_sort >

Detailed Description

template<bool stable_sort = false>
class util::internal::DenseIntTopologicalSorterTpl< stable_sort >

Definition at line 190 of file topologicalsorter.h.

Public Types

typedef absl::InlinedVector< int, 4 > AdjacencyList
 

Public Member Functions

 DenseIntTopologicalSorterTpl ()
 
 DenseIntTopologicalSorterTpl (int num_nodes)
 
void AddNode (int node_index)
 
void AddEdges (const std::vector< std::pair< int, int >> &edges)
 
void AddEdge (int from, int to)
 
bool GetNext (int *next_node_index, bool *cyclic, std::vector< int > *output_cycle_nodes=nullptr)
 
int GetCurrentFringeSize ()
 
void StartTraversal ()
 
bool TraversalStarted () const
 
void ExtractCycle (std::vector< int > *cycle_nodes) const
 

Static Public Member Functions

static int RemoveDuplicates (std::vector< AdjacencyList > *lists, int skip_lists_smaller_than)
 

Member Typedef Documentation

◆ AdjacencyList

typedef absl::InlinedVector<int, 4> AdjacencyList

Definition at line 193 of file topologicalsorter.h.

Constructor & Destructor Documentation

◆ DenseIntTopologicalSorterTpl() [1/2]

Definition at line 197 of file topologicalsorter.h.

◆ DenseIntTopologicalSorterTpl() [2/2]

DenseIntTopologicalSorterTpl ( int  num_nodes)
inlineexplicit

Definition at line 205 of file topologicalsorter.h.

Member Function Documentation

◆ AddEdge()

void AddEdge ( int  from,
int  to 
)

Definition at line 97 of file topologicalsorter.cc.

◆ AddEdges()

void AddEdges ( const std::vector< std::pair< int, int >> &  edges)

Definition at line 68 of file topologicalsorter.cc.

◆ AddNode()

void AddNode ( int  node_index)

Definition at line 48 of file topologicalsorter.cc.

◆ ExtractCycle()

void ExtractCycle ( std::vector< int > *  cycle_nodes) const

Definition at line 252 of file topologicalsorter.cc.

◆ GetCurrentFringeSize()

int GetCurrentFringeSize ( )
inline

Definition at line 233 of file topologicalsorter.h.

◆ GetNext()

bool GetNext ( int *  next_node_index,
bool *  cyclic,
std::vector< int > *  output_cycle_nodes = nullptr 
)

Definition at line 128 of file topologicalsorter.cc.

◆ RemoveDuplicates()

int RemoveDuplicates ( std::vector< AdjacencyList > *  lists,
int  skip_lists_smaller_than 
)
static

Definition at line 202 of file topologicalsorter.cc.

◆ StartTraversal()

void StartTraversal

Definition at line 169 of file topologicalsorter.cc.

◆ TraversalStarted()

bool TraversalStarted ( ) const
inline

Definition at line 240 of file topologicalsorter.h.


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