Template Function ADS::littleTsp

Function Documentation

template<class T>
std::pair<T, Nodes> ADS::littleTsp(const std::vector<std::vector<T>> &D, long *generated = nullptr)

littleTsp(): the cost and a minimum circuit from 0, by the reduction of the matrix; the number of nodes of the tree generated goes to *generated, if given

Pre:

D is square

Post:

a permutation and its cost, if n >= 2