OR-Tools  9.3
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 517 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=nullptr)
 
int GetCurrentFringeSize ()
 
void StartTraversal ()
 
bool TraversalStarted () const
 

Member Function Documentation

◆ AddEdge()

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

Definition at line 288 of file topologicalsorter.h.

◆ AddNode()

void AddNode ( const T &  node)
inlineinherited

Definition at line 282 of file topologicalsorter.h.

◆ GetCurrentFringeSize()

int GetCurrentFringeSize ( )
inlineinherited

Definition at line 334 of file topologicalsorter.h.

◆ GetNext()

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

Definition at line 313 of file topologicalsorter.h.

◆ StartTraversal()

void StartTraversal ( )
inlineinherited

Definition at line 343 of file topologicalsorter.h.

◆ TraversalStarted()

bool TraversalStarted ( ) const
inlineinherited

Definition at line 357 of file topologicalsorter.h.


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