Function ADS::cycleToChain

Function Documentation

inline Adjacency ADS::cycleToChain(const Adjacency &G)

CICLO HAMILTONIANO to CATENA HAMILTONIANA: the path of cycleToPath(), each node v a chain v_in - v_mid - v_out, each edge ( u , v ) an edge u_out - v_in, and pendant nodes at the start and at the end.

Pre:

G is square and not empty

Post:

an unoriented graph of 3 ( n + 1 ) + 2 nodes