Function ADS::hamiltonianChain

Function Documentation

inline std::optional<Nodes> ADS::hamiltonianChain(const Adjacency &G)

an unoriented chain through every node once

Pre:

G is unoriented, i.e., square and symmetric

Post:

a chain returned visits each node once along the edges