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 util::TopologicalSorter< T, stable_sort, Hash, KeyEqual >

Definition at line 268 of file topologicalsorter.h.

Public Member Functions

 TopologicalSorter ()
 
 ~TopologicalSorter ()
 
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
 

Constructor & Destructor Documentation

◆ TopologicalSorter()

TopologicalSorter ( )
inline

Definition at line 270 of file topologicalsorter.h.

◆ ~TopologicalSorter()

~TopologicalSorter ( )
inline

Definition at line 271 of file topologicalsorter.h.

Member Function Documentation

◆ AddEdge()

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

Definition at line 287 of file topologicalsorter.h.

◆ AddNode()

void AddNode ( const T &  node)
inline

Definition at line 281 of file topologicalsorter.h.

◆ GetCurrentFringeSize()

int GetCurrentFringeSize ( )
inline

Definition at line 332 of file topologicalsorter.h.

◆ GetNext()

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

Definition at line 312 of file topologicalsorter.h.

◆ StartTraversal()

void StartTraversal ( )
inline

Definition at line 341 of file topologicalsorter.h.

◆ TraversalStarted()

bool TraversalStarted ( ) const
inline

Definition at line 355 of file topologicalsorter.h.


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