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);
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["The C++ `eulerian_path` utility helps build Eulerian paths and tours on undirected graphs."],["It provides functions like `BuildEulerianPath`, `BuildEulerianTour`, and helper functions to check graph properties."],["Usage involves creating a `ReverseArcListGraph`, filling it, and then calling the appropriate function to get the path or tour as a `std::vector` of node indices."],["As of October 2015, the utility only supports undirected graphs, meaning edges are bidirectional."],["Refer to the linked Wikipedia page for a detailed explanation of Eulerian paths and tours."]]],["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"]]