OR-Tools  8.2
TopologicalSorter< T, stable_sort, Hash, KeyEqual >

Detailed Description

template<typename T, bool stable_sort = false, typename Hash = typename absl::flat_hash_map<T, int>::hasher, typename KeyEqual = typename absl::flat_hash_map<T, int, Hash>::key_equal>
class TopologicalSorter< T, stable_sort, Hash, KeyEqual >

Definition at line 515 of file topologicalsorter.h.

Public Member Functions

void AddNode (const T &node)
 
void AddEdge (const T &from, const T &to)
 
bool GetNext (T *node, bool *cyclic_ptr, std::vector< T > *output_cycle_nodes=NULL)
 
int GetCurrentFringeSize ()
 
void StartTraversal ()
 
bool TraversalStarted () const
 

Member Function Documentation

◆ AddEdge()

void AddEdge ( const T &  from,
const T &  to 
)
inlineinherited

Definition at line 287 of file topologicalsorter.h.

◆ AddNode()

void AddNode ( const T &  node)
inlineinherited

Definition at line 281 of file topologicalsorter.h.

◆ GetCurrentFringeSize()

int GetCurrentFringeSize ( )
inlineinherited

Definition at line 332 of file topologicalsorter.h.

◆ GetNext()

bool GetNext ( T *  node,
bool *  cyclic_ptr,
std::vector< T > *  output_cycle_nodes = NULL 
)
inlineinherited

Definition at line 312 of file topologicalsorter.h.

◆ StartTraversal()

void StartTraversal ( )
inlineinherited

Definition at line 341 of file topologicalsorter.h.

◆ TraversalStarted()

bool TraversalStarted ( ) const
inlineinherited

Definition at line 355 of file topologicalsorter.h.


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