Function ADS::hamiltonianPath

Function Documentation

inline std::optional<Nodes> ADS::hamiltonianPath(const Adjacency &G, int r = -1, int t = -1)

an oriented path through every node once, from r and to t if given

Pre:

G is square, r and t are nodes or -1

Post:

a path returned visits each node once along the edges, from r and to t if given