Template Function ADS::greedyTsp
Defined in File Heuristics.h
Function Documentation
-
template<class T>
std::pair<std::vector<std::pair<int, int>>, Nodes> ADS::greedyTsp(const std::vector<std::vector<T>> &D) greedyTsp(): the edges chosen, in the order of insertion, the last one closing the chain, and the circuit from 0, for the symmetric distances D of n >= 3 cities
- Pre:
D is square and symmetric, and n >= 3
- Post:
n edges and a permutation of the cities