merge version 1 and version 2 of TSP together, this change include
Mingze's code for 'case.java' and Jianqi's code for 'kdTree.java'