Stay organized with collections
Save and categorize content based on your preferences.
C++ Reference: eulerian_path
Note: This documentation is automatically generated.
Utility to build Eulerian paths and tours on a graph. For more information, see
https://en.wikipedia.org/wiki/Eulerian_path. As of 10/2015, only undirected graphs are supported.
Usage:
- Building an Eulerian tour on a ReverseArcListGraph:
ReverseArcListGraph<int, int> graph;
// Fill graph
std::vector<int> tour = BuildEulerianTour(graph);
- Building an Eulerian path on a ReverseArcListGraph:
ReverseArcListGraph<int, int> graph;
// Fill graph
std::vector<int> tour = BuildEulerianPath(graph);
Function |
Type |
Arguments |
Comments |
BuildEulerianPath | Return type: std::vector<typename Graph::NodeIndex> Arguments: const Graph& graph |
BuildEulerianPathFromNode | Return type: std::vector<NodeIndex> Arguments: const Graph& graph, NodeIndex root |
BuildEulerianTour | Return type: std::vector<typename Graph::NodeIndex> Arguments: const Graph& graph |
BuildEulerianTourFromNode | Return type: std::vector<NodeIndex> Arguments: const Graph& graph, NodeIndex root |
IsEulerianGraph | Return type: bool Arguments: const Graph& graph |
IsSemiEulerianGraph | Return type: bool Arguments: const Graph& graph, std::vector<NodeIndex>* odd_nodes |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[null,null,["Last updated 2024-08-06 UTC."],[],["This C++ utility builds Eulerian paths and tours on undirected graphs using `ReverseArcListGraph`. Key functions include `BuildEulerianPath` and `BuildEulerianTour`, which generate a vector representing the path or tour. `BuildEulerianPathFromNode` and `BuildEulerianTourFromNode` allow specifying a starting node. Additionally, `IsEulerianGraph` and `IsSemiEulerianGraph` check if a graph is Eulerian or semi-Eulerian.\n"],null,[]]