#ifndef TSP_H_
#define TSP_H_

#include <iostream>
#include <list>
#include "networks/graph/RealWeightedGraph.h"
#include "algorithms/graph/MinimuSpanningTree.h"

namespace cosi {

namespace algorithms {

namespace graph {

class Tsp {
public:
	Tsp(cosi::commstruct::graph::U_RealWeightedGraph* pN);
	virtual ~Tsp();
	void Run();
	std::list<int> Get();
private:

	void DfsInit(cosi::commstruct::graph::U_RealWeightedGraph* pM) ;
	void DfsVisit(int Root) ;
	cosi::commstruct::graph::U_RealWeightedGraph* mN;
	cosi::commstruct::graph::U_RealWeightedGraph* mMd;
	std::list<int> mTour ;
	enum Color{WHITE,GRAY,BLACK} ;
	std::map<int,Color> mColor ;

};

}

}

}

#endif /*TSP_H_*/
