![]() |
Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
|
Namespaces | |
| namespace | math |
| namespace | graph |
| namespace | internal |
Classes | |
| class | StatusBuilder |
| class | FlowGraph |
| class | BaseGraph |
| class | ArcPropertyIterator |
| struct | GraphTraits |
| class | ListGraph |
| class | StaticGraph |
| class | ReverseArcListGraph |
| class | ReverseArcStaticGraph |
| class | CompleteGraph |
| class | CompleteBipartiteGraph |
| class | BeginEndWrapper |
| class | BeginEndReverseIteratorWrapper |
| class | IntegerRangeIterator |
| class | IntegerRange |
| class | ChasingIterator |
| class | TopologicalSorter |
| class | UndirectedAdjacencyListsOfDirectedGraph |
Typedefs | |
| template<typename Graph, typename ArcIterator> | |
| using | ArcHeadIterator |
| template<typename Graph, typename ArcIterator> | |
| using | ArcOppositeArcIterator |
| typedef ListGraph | Graph |
| typedef ::util::internal::DenseIntTopologicalSorterTpl< true > | DenseIntStableTopologicalSorter |
| typedef ::util::internal::DenseIntTopologicalSorterTpl< false > | DenseIntTopologicalSorter |
Enumerations | |
| enum | GraphToStringFormat { PRINT_GRAPH_ARCS , PRINT_GRAPH_ADJACENCY_LISTS , PRINT_GRAPH_ADJACENCY_LISTS_SORTED , PRINT_GRAPH_DOT } |
Functions | |
| StatusBuilder | AbortedErrorBuilder () |
| StatusBuilder | AlreadyExistsErrorBuilder () |
| StatusBuilder | CancelledErrorBuilder () |
| StatusBuilder | DataLossErrorBuilder () |
| StatusBuilder | DeadlineExceededErrorBuilder () |
| StatusBuilder | FailedPreconditionErrorBuilder () |
| StatusBuilder | InternalErrorBuilder () |
| StatusBuilder | InvalidArgumentErrorBuilder () |
| StatusBuilder | NotFoundErrorBuilder () |
| StatusBuilder | OutOfRangeErrorBuilder () |
| StatusBuilder | PermissionDeniedErrorBuilder () |
| StatusBuilder | UnauthenticatedErrorBuilder () |
| StatusBuilder | ResourceExhaustedErrorBuilder () |
| StatusBuilder | UnavailableErrorBuilder () |
| StatusBuilder | UnimplementedErrorBuilder () |
| StatusBuilder | UnknownErrorBuilder () |
| template<class UndirectedGraph, class NodeType> | |
| std::vector< NodeType > | GetConnectedComponentsTpl (NodeType num_nodes, const UndirectedGraph &graph) |
| template<class UndirectedGraph> | |
| std::vector< int > | GetConnectedComponents (int num_nodes, const UndirectedGraph &graph) |
| template<class IntVector, class Array> | |
| void | Permute (const IntVector &permutation, Array *array_to_permute) |
| DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcListGraph, OutgoingOrOppositeIncoming) | |
| DEFINE_RANGE_BASED_ARC_ITERATION (ReverseArcStaticGraph, OutgoingOrOppositeIncoming) | |
| template<class Graph> | |
| std::string | GraphToString (const Graph &graph, GraphToStringFormat format) |
| template<class Graph> | |
| absl::Status | WriteGraphToFile (const Graph &graph, const std::string &filename, bool directed, absl::Span< const int > num_nodes_with_color) |
| template<typename Iterator> | |
| BeginEndWrapper< Iterator > | BeginEndRange (Iterator begin, Iterator end) |
| template<typename Iterator> | |
| BeginEndWrapper< Iterator > | BeginEndRange (std::pair< Iterator, Iterator > begin_end) |
| template<typename MultiMap> | |
| BeginEndWrapper< typename MultiMap::iterator > | EqualRange (MultiMap &multi_map, const typename MultiMap::key_type &key) |
| template<typename MultiMap> | |
| BeginEndWrapper< typename MultiMap::const_iterator > | EqualRange (const MultiMap &multi_map, const typename MultiMap::key_type &key) |
| template<typename Container> | |
| BeginEndReverseIteratorWrapper< Container > | Reverse (const Container &c) |
| std::unique_ptr< StaticGraph<> > | GenerateRandomMultiGraph (int num_nodes, int num_arcs, bool finalized, absl::BitGenRef gen) |
| std::unique_ptr< StaticGraph<> > | GenerateRandomDirectedSimpleGraph (int num_nodes, int num_arcs, bool finalized, absl::BitGenRef gen) |
| std::unique_ptr< StaticGraph<> > | GenerateRandomUndirectedSimpleGraph (int num_nodes, int num_edges, bool finalized, absl::BitGenRef gen) |
| template<class Graph> | |
| std::unique_ptr< Graph > | Create2DGridGraph (int64_t width, int64_t height) |
| template<typename T> | |
| ABSL_MUST_USE_RESULT bool | TopologicalSort (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order) |
| template<typename T> | |
| ABSL_MUST_USE_RESULT bool | TopologicalSort (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order, std::vector< T > *cycle) |
| template<typename T> | |
| std::vector< T > | TopologicalSortOrDie (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs) |
| template<typename T> | |
| ABSL_MUST_USE_RESULT bool | StableTopologicalSort (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order) |
| template<typename T> | |
| ABSL_MUST_USE_RESULT bool | StableTopologicalSort (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order, std::vector< T > *cycle) |
| template<typename T> | |
| std::vector< T > | StableTopologicalSortOrDie (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs) |
| ABSL_MUST_USE_RESULT std::vector< int > | FindCycleInDenseIntGraph (int num_nodes, const std::vector< std::pair< int, int > > &arcs) |
| ABSL_MUST_USE_RESULT bool | DenseIntTopologicalSort (int num_nodes, const std::vector< std::pair< int, int > > &arcs, std::vector< int > *topological_order) |
| std::vector< int > | DenseIntStableTopologicalSortOrDie (int num_nodes, const std::vector< std::pair< int, int > > &arcs) |
| ABSL_MUST_USE_RESULT bool | DenseIntStableTopologicalSort (int num_nodes, const std::vector< std::pair< int, int > > &arcs, std::vector< int > *topological_order) |
| std::vector< int > | DenseIntTopologicalSortOrDie (int num_nodes, const std::vector< std::pair< int, int > > &arcs) |
| template<typename T> | |
| bool | TopologicalSort (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order) |
| template<typename T> | |
| bool | TopologicalSort (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order, std::vector< T > *cycle) |
| template<typename T> | |
| bool | StableTopologicalSort (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order) |
| template<typename T> | |
| bool | StableTopologicalSort (const std::vector< T > &nodes, const std::vector< std::pair< T, T > > &arcs, std::vector< T > *topological_order, std::vector< T > *cycle) |
| bool | IsSubsetOf0N (absl::Span< const int > v, int n) |
| template<class Graph> | |
| bool | GraphHasSelfArcs (const Graph &graph) |
| template<class Graph> | |
| bool | GraphHasDuplicateArcs (const Graph &graph) |
| template<class Graph> | |
| bool | GraphIsSymmetric (const Graph &graph) |
| template<class Graph> | |
| bool | GraphIsWeaklyConnected (const Graph &graph) |
| template<class Graph> | |
| std::unique_ptr< Graph > | CopyGraph (const Graph &graph) |
| template<class Graph> | |
| std::unique_ptr< Graph > | RemapGraph (const Graph &graph, absl::Span< const int > new_node_index) |
| template<class Graph> | |
| std::unique_ptr< Graph > | GetSubgraphOfNodes (const Graph &graph, absl::Span< const int > nodes) |
| template<class Graph> | |
| UndirectedAdjacencyListsOfDirectedGraph (const Graph &) -> UndirectedAdjacencyListsOfDirectedGraph< Graph > | |
| template<class Graph> | |
| std::vector< int > | GetWeaklyConnectedComponents (const Graph &graph) |
| bool | IsValidPermutation (absl::Span< const int > v) |
| template<class Graph> | |
| std::unique_ptr< Graph > | RemoveSelfArcsAndDuplicateArcs (const Graph &graph) |
| template<class Graph> | |
| void | RemoveCyclesFromPath (const Graph &graph, std::vector< int > *arc_path) |
| template<class Graph> | |
| bool | PathHasCycle (const Graph &graph, absl::Span< const int > arc_path) |
| template<class Graph> | |
| std::vector< int > | ComputeOnePossibleReverseArcMapping (const Graph &graph, bool die_if_not_symmetric) |
| using util::ArcHeadIterator |
| using util::ArcOppositeArcIterator |
Definition at line 296 of file topologicalsorter.h.
Definition at line 305 of file topologicalsorter.h.
| typedef ListGraph util::Graph |
| Enumerator | |
|---|---|
| PRINT_GRAPH_ARCS | |
| PRINT_GRAPH_ADJACENCY_LISTS | |
| PRINT_GRAPH_ADJACENCY_LISTS_SORTED | |
| PRINT_GRAPH_DOT | |
Definition at line 42 of file graph_io.h.
|
inline |
Definition at line 79 of file status_builder.h.
|
inline |
Definition at line 83 of file status_builder.h.
|
inline |
Definition at line 75 of file iterators.h.
|
inline |
Definition at line 79 of file iterators.h.
|
inline |
Definition at line 87 of file status_builder.h.
| std::unique_ptr< Graph > util::Create2DGridGraph | ( | int64_t | width, |
| int64_t | height ) |
Definition at line 37 of file test_util.h.
|
inline |
Definition at line 91 of file status_builder.h.
|
inline |
Definition at line 95 of file status_builder.h.
| util::DEFINE_RANGE_BASED_ARC_ITERATION | ( | ReverseArcListGraph | , |
| OutgoingOrOppositeIncoming | ) |
| util::DEFINE_RANGE_BASED_ARC_ITERATION | ( | ReverseArcStaticGraph | , |
| OutgoingOrOppositeIncoming | ) |
|
inline |
Definition at line 530 of file topologicalsorter.h.
|
inline |
Definition at line 575 of file topologicalsorter.h.
|
inline |
Definition at line 523 of file topologicalsorter.h.
|
inline |
Definition at line 570 of file topologicalsorter.h.
|
inline |
Definition at line 93 of file iterators.h.
|
inline |
Definition at line 88 of file iterators.h.
|
inline |
Definition at line 99 of file status_builder.h.
|
inline |
Definition at line 153 of file topologicalsorter.h.
| std::unique_ptr< StaticGraph<> > util::GenerateRandomDirectedSimpleGraph | ( | int | num_nodes, |
| int | num_arcs, | ||
| bool | finalized, | ||
| absl::BitGenRef | gen ) |
Definition at line 161 of file random_graph.cc.
| std::unique_ptr< StaticGraph<> > util::GenerateRandomMultiGraph | ( | int | num_nodes, |
| int | num_arcs, | ||
| bool | finalized, | ||
| absl::BitGenRef | gen ) |
Definition at line 54 of file random_graph.cc.
| std::unique_ptr< StaticGraph<> > util::GenerateRandomUndirectedSimpleGraph | ( | int | num_nodes, |
| int | num_edges, | ||
| bool | finalized, | ||
| absl::BitGenRef | gen ) |
Definition at line 167 of file random_graph.cc.
| std::vector< int > util::GetConnectedComponents | ( | int | num_nodes, |
| const UndirectedGraph & | graph ) |
Definition at line 65 of file connected_components.h.
| std::vector< NodeType > util::GetConnectedComponentsTpl | ( | NodeType | num_nodes, |
| const UndirectedGraph & | graph ) |
Definition at line 324 of file connected_components.h.
| std::string util::GraphToString | ( | const Graph & | graph, |
| GraphToStringFormat | format ) |
Definition at line 79 of file graph_io.h.
|
inline |
Definition at line 103 of file status_builder.h.
|
inline |
Definition at line 107 of file status_builder.h.
|
inline |
|
inline |
Definition at line 111 of file status_builder.h.
|
inline |
Definition at line 115 of file status_builder.h.
|
inline |
Definition at line 119 of file status_builder.h.
| void util::Permute | ( | const IntVector & | permutation, |
| Array * | array_to_permute ) |
|
inline |
Definition at line 127 of file status_builder.h.
| BeginEndReverseIteratorWrapper< Container > util::Reverse | ( | const Container & | c | ) |
Definition at line 115 of file iterators.h.
| bool util::StableTopologicalSort | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs, | ||
| std::vector< T > * | topological_order ) |
Definition at line 554 of file topologicalsorter.h.
| ABSL_MUST_USE_RESULT bool util::StableTopologicalSort | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs, | ||
| std::vector< T > * | topological_order ) |
Definition at line 554 of file topologicalsorter.h.
| bool util::StableTopologicalSort | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs, | ||
| std::vector< T > * | topological_order, | ||
| std::vector< T > * | cycle ) |
Definition at line 562 of file topologicalsorter.h.
| ABSL_MUST_USE_RESULT bool util::StableTopologicalSort | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs, | ||
| std::vector< T > * | topological_order, | ||
| std::vector< T > * | cycle ) |
Definition at line 562 of file topologicalsorter.h.
| std::vector< T > util::StableTopologicalSortOrDie | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs ) |
Definition at line 587 of file topologicalsorter.h.
| bool util::TopologicalSort | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs, | ||
| std::vector< T > * | topological_order ) |
Definition at line 538 of file topologicalsorter.h.
| ABSL_MUST_USE_RESULT bool util::TopologicalSort | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs, | ||
| std::vector< T > * | topological_order ) |
Definition at line 538 of file topologicalsorter.h.
| bool util::TopologicalSort | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs, | ||
| std::vector< T > * | topological_order, | ||
| std::vector< T > * | cycle ) |
Definition at line 546 of file topologicalsorter.h.
| ABSL_MUST_USE_RESULT bool util::TopologicalSort | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs, | ||
| std::vector< T > * | topological_order, | ||
| std::vector< T > * | cycle ) |
Definition at line 546 of file topologicalsorter.h.
| std::vector< T > util::TopologicalSortOrDie | ( | const std::vector< T > & | nodes, |
| const std::vector< std::pair< T, T > > & | arcs ) |
Definition at line 581 of file topologicalsorter.h.
|
inline |
Definition at line 123 of file status_builder.h.
|
inline |
Definition at line 131 of file status_builder.h.
| util::UndirectedAdjacencyListsOfDirectedGraph | ( | const Graph & | ) | ->UndirectedAdjacencyListsOfDirectedGraph< Graph > |
|
inline |
Definition at line 135 of file status_builder.h.
|
inline |
Definition at line 139 of file status_builder.h.
| absl::Status util::WriteGraphToFile | ( | const Graph & | graph, |
| const std::string & | filename, | ||
| bool | directed, | ||
| absl::Span< const int > | num_nodes_with_color ) |
Definition at line 115 of file graph_io.h.