Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util::internal Namespace Reference

Classes

class  SVector
class  Vector
class  DenseIntTopologicalSorterTpl

Functions

template<class Key, class Value>
void PermuteInto (absl::Span< const Key > permutation, absl::Span< const Value > input, absl::Span< Value > output)
template<typename ArcIndexType>
constexpr bool IsSigned ()
template<typename T, typename Sorter>
ABSL_MUST_USE_RESULT bool RunTopologicalSorter (Sorter *sorter, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order_or_cycle)
template<typename T, typename Sorter>
ABSL_MUST_USE_RESULT bool RunTopologicalSorter (Sorter *sorter, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order, std::vector< T > *cycle)
template<bool stable_sort = false>
ABSL_MUST_USE_RESULT bool DenseIntTopologicalSortImpl (int num_nodes, const std::vector< std::pair< int, int > > &arcs, std::vector< int > *topological_order)
template<typename T, bool stable_sort = false>
ABSL_MUST_USE_RESULT bool TopologicalSortImpl (absl::Span< const T > nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order, std::vector< T > *cycle)
template<typename T, typename Sorter>
std::vector< T > RunTopologicalSorterOrDie (Sorter *sorter, int num_nodes, const std::vector< std::pair< T, T > > &arcs)
template<bool stable_sort = false>
std::vector< int > DenseIntTopologicalSortOrDieImpl (int num_nodes, const std::vector< std::pair< int, int > > &arcs)
template<typename T, bool stable_sort = false>
std::vector< T > TopologicalSortOrDieImpl (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs)

Variables

static const int kLazyDuplicateDetectionSizeThreshold = 16

Function Documentation

◆ DenseIntTopologicalSortImpl()

template<bool stable_sort = false>
ABSL_MUST_USE_RESULT bool util::internal::DenseIntTopologicalSortImpl ( int num_nodes,
const std::vector< std::pair< int, int > > & arcs,
std::vector< int > * topological_order )

Definition at line 472 of file topologicalsorter.h.

◆ DenseIntTopologicalSortOrDieImpl()

template<bool stable_sort = false>
std::vector< int > util::internal::DenseIntTopologicalSortOrDieImpl ( int num_nodes,
const std::vector< std::pair< int, int > > & arcs )

Definition at line 505 of file topologicalsorter.h.

◆ IsSigned()

template<typename ArcIndexType>
bool util::internal::IsSigned ( )
constexpr

Definition at line 396 of file graph.h.

◆ PermuteInto()

template<class Key, class Value>
void util::internal::PermuteInto ( absl::Span< const Key > permutation,
absl::Span< const Value > input,
absl::Span< Value > output )

Definition at line 215 of file flow_graph.h.

◆ RunTopologicalSorter() [1/2]

template<typename T, typename Sorter>
ABSL_MUST_USE_RESULT bool util::internal::RunTopologicalSorter ( Sorter * sorter,
const std::vector< std::pair< T, T > > & arcs,
std::vector< T > * topological_order,
std::vector< T > * cycle )

Definition at line 457 of file topologicalsorter.h.

◆ RunTopologicalSorter() [2/2]

template<typename T, typename Sorter>
ABSL_MUST_USE_RESULT bool util::internal::RunTopologicalSorter ( Sorter * sorter,
const std::vector< std::pair< T, T > > & arcs,
std::vector< T > * topological_order_or_cycle )

◆ RunTopologicalSorterOrDie()

template<typename T, typename Sorter>
std::vector< T > util::internal::RunTopologicalSorterOrDie ( Sorter * sorter,
int num_nodes,
const std::vector< std::pair< T, T > > & arcs )

Definition at line 495 of file topologicalsorter.h.

◆ TopologicalSortImpl()

template<typename T, bool stable_sort = false>
ABSL_MUST_USE_RESULT bool util::internal::TopologicalSortImpl ( absl::Span< const T > nodes,
const std::vector< std::pair< T, T > > & arcs,
std::vector< T > * topological_order,
std::vector< T > * cycle )

Definition at line 482 of file topologicalsorter.h.

◆ TopologicalSortOrDieImpl()

template<typename T, bool stable_sort = false>
std::vector< T > util::internal::TopologicalSortOrDieImpl ( const std::vector< T > & nodes,
const std::vector< std::pair< T, T > > & arcs )

Definition at line 512 of file topologicalsorter.h.

Variable Documentation

◆ kLazyDuplicateDetectionSizeThreshold

const int util::internal::kLazyDuplicateDetectionSizeThreshold = 16
static

Definition at line 66 of file topologicalsorter.cc.