58#ifndef GUM_GRAPH_PATH_FINDING_H
59#define GUM_GRAPH_PATH_FINDING_H
72 inline std::vector< NodeId >
86 template < GUM_DiGraphable G >
95 template < GUM_DiGraphable G >
103 template < GUM_DiGraphable G >
116 template < GUM_UndiGraphable G >
122 template < GUM_UndiGraphable G >
129 template < GUM_UndiGraphable G >
136 template < GUM_UndiGraphable G >
149 template < GUM_MixedGraphable G >
155 template < GUM_MixedGraphable G >
164 template < GUM_MixedGraphable G >
C++20 concepts for aGrUM graph interfaces.
Size NodeId
Type for node ids.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
std::vector< NodeId > reconstructPath(const NodeProperty< NodeId > &mark, NodeId n1, NodeId n2)
Reconstruct the BFS path [n1 … n2] from the predecessor mark table.
std::optional< std::vector< NodeId > > undirectedPath(const G &g, NodeId n1, NodeId n2)
Shortest undirected path from n1 to n2 (BFS).
bool hasMixedOrientedPath(const G &g, NodeId n1, NodeId n2)
Returns true if a mixed-oriented path from n1 to n2 exists.
std::optional< std::vector< NodeId > > directedUnorientedPath(const G &g, NodeId n1, NodeId n2)
Shortest path from n1 to n2 ignoring arc orientation (BFS).
std::optional< std::vector< NodeId > > directedPath(const G &g, NodeId n1, NodeId n2)
Shortest directed path from n1 to n2 (BFS, arc direction).
std::optional< std::vector< NodeId > > mixedUnorientedPath(const G &g, NodeId n1, NodeId n2)
Shortest path ignoring all orientations in a mixed graph.
bool hasDirectedPath(const G &g, NodeId from, NodeId to)
Returns true if there is a directed path from from to to.
std::optional< std::vector< NodeId > > mixedOrientedPath(const G &g, NodeId n1, NodeId n2)
Shortest mixed-oriented path from n1 to n2.
bool hasUndirectedPath(const G &g, NodeId n1, NodeId n2)
Returns true if an undirected path exists between n1 and n2.