Auto Commit
This commit is contained in:
@@ -35,7 +35,7 @@ std::vector<double> MakePermutationMatrix::MakePermutation(std::vector<City> sou
|
|||||||
std::cout << nextPerm[i].GetName() << " ";
|
std::cout << nextPerm[i].GetName() << " ";
|
||||||
}
|
}
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
do {
|
if(!rank){do {
|
||||||
double cost = 0;
|
double cost = 0;
|
||||||
//Add up the cost of the current permutation.
|
//Add up the cost of the current permutation.
|
||||||
std::cout <<"Rank: " << rank << " Current perm: ";
|
std::cout <<"Rank: " << rank << " Current perm: ";
|
||||||
@@ -48,8 +48,8 @@ std::vector<double> MakePermutationMatrix::MakePermutation(std::vector<City> sou
|
|||||||
//Push permutation cost to the localCostVector.
|
//Push permutation cost to the localCostVector.
|
||||||
localCostVector.push_back(cost);
|
localCostVector.push_back(cost);
|
||||||
counter++;
|
counter++;
|
||||||
} while (std::next_permutation(myPerm.begin(), myPerm.end()) && myPerm != nextPerm);
|
} while (std::next_permutation(myPerm.begin(), myPerm.end()));
|
||||||
|
}
|
||||||
// //find the lowest and add it to a lowest vector.
|
// //find the lowest and add it to a lowest vector.
|
||||||
// auto lowest = std::vector<double>(1,localCostVector[0]);
|
// auto lowest = std::vector<double>(1,localCostVector[0]);
|
||||||
// for(int i = 0; i < localCostVector.size(); i++) {
|
// for(int i = 0; i < localCostVector.size(); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user