Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util::internal::DenseIntTopologicalSorterTpl< stable_sort > Class Template Reference

Detailed Description

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

Definition at line 198 of file topologicalsorter.h.

#include <topologicalsorter.h>

Public Types

typedef absl::InlinedVector< int, 4 > AdjacencyList

Public Member Functions

 DenseIntTopologicalSorterTpl ()
 DenseIntTopologicalSorterTpl (int num_nodes)
 DenseIntTopologicalSorterTpl (const DenseIntTopologicalSorterTpl &)=delete
DenseIntTopologicalSorterTploperator= (const DenseIntTopologicalSorterTpl &)=delete
void AddNode (int node_index)
void AddEdges (absl::Span< const 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

template<bool stable_sort = false>
typedef absl::InlinedVector<int, 4> util::internal::DenseIntTopologicalSorterTpl< stable_sort >::AdjacencyList

Definition at line 201 of file topologicalsorter.h.

Constructor & Destructor Documentation

◆ DenseIntTopologicalSorterTpl() [1/3]

template<bool stable_sort = false>
util::internal::DenseIntTopologicalSorterTpl< stable_sort >::DenseIntTopologicalSorterTpl ( )
inline

Definition at line 205 of file topologicalsorter.h.

◆ DenseIntTopologicalSorterTpl() [2/3]

template<bool stable_sort = false>
util::internal::DenseIntTopologicalSorterTpl< stable_sort >::DenseIntTopologicalSorterTpl ( int num_nodes)
inlineexplicit

Definition at line 213 of file topologicalsorter.h.

◆ DenseIntTopologicalSorterTpl() [3/3]

template<bool stable_sort = false>
util::internal::DenseIntTopologicalSorterTpl< stable_sort >::DenseIntTopologicalSorterTpl ( const DenseIntTopologicalSorterTpl< stable_sort > & )
delete

Member Function Documentation

◆ AddEdge()

template<bool stable_sort>
void util::internal::DenseIntTopologicalSorterTpl< stable_sort >::AddEdge ( int from,
int to )

Definition at line 98 of file topologicalsorter.cc.

◆ AddEdges()

template<bool stable_sort>
void util::internal::DenseIntTopologicalSorterTpl< stable_sort >::AddEdges ( absl::Span< const std::pair< int, int > > edges)

Definition at line 69 of file topologicalsorter.cc.

◆ AddNode()

template<bool stable_sort>
void util::internal::DenseIntTopologicalSorterTpl< stable_sort >::AddNode ( int node_index)

Definition at line 49 of file topologicalsorter.cc.

◆ ExtractCycle()

template<bool stable_sort>
void util::internal::DenseIntTopologicalSorterTpl< stable_sort >::ExtractCycle ( std::vector< int > * cycle_nodes) const

Definition at line 253 of file topologicalsorter.cc.

◆ GetCurrentFringeSize()

template<bool stable_sort = false>
int util::internal::DenseIntTopologicalSorterTpl< stable_sort >::GetCurrentFringeSize ( )
inline

Definition at line 246 of file topologicalsorter.h.

◆ GetNext()

template<bool stable_sort>
bool util::internal::DenseIntTopologicalSorterTpl< stable_sort >::GetNext ( int * next_node_index,
bool * cyclic,
std::vector< int > * output_cycle_nodes = nullptr )

Definition at line 129 of file topologicalsorter.cc.

◆ operator=()

template<bool stable_sort = false>
DenseIntTopologicalSorterTpl & util::internal::DenseIntTopologicalSorterTpl< stable_sort >::operator= ( const DenseIntTopologicalSorterTpl< stable_sort > & )
delete

◆ RemoveDuplicates()

template<bool stable_sort>
int util::internal::DenseIntTopologicalSorterTpl< stable_sort >::RemoveDuplicates ( std::vector< AdjacencyList > * lists,
int skip_lists_smaller_than )
static

Definition at line 203 of file topologicalsorter.cc.

◆ StartTraversal()

template<bool stable_sort>
void util::internal::DenseIntTopologicalSorterTpl< stable_sort >::StartTraversal ( )

Definition at line 170 of file topologicalsorter.cc.

◆ TraversalStarted()

template<bool stable_sort = false>
bool util::internal::DenseIntTopologicalSorterTpl< stable_sort >::TraversalStarted ( ) const
inline

Definition at line 253 of file topologicalsorter.h.


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