Auto Commit

This commit is contained in:
2020-03-30 19:15:10 -06:00
parent c1a3bb808a
commit aabe5f0f32

View File

@@ -39,8 +39,10 @@ std::vector<double> MakePermutationMatrix::MakePermutation(std::vector<City> sou
double cost = 0; double cost = 0;
//Add up the cost of the current permutation. //Add up the cost of the current permutation.
for (int i = 1; i < myPerm.size(); i++) { for (int i = 1; i < myPerm.size(); i++) {
std::cout << myPerm[i].GetName() << " ";
cost += costMatrix[myPerm[i].GetName()][myPerm[i-1].GetName()]; cost += costMatrix[myPerm[i].GetName()][myPerm[i-1].GetName()];
} }
std::cout << std::endl << std::endl;
//Push permutation cost to the localCostVector. //Push permutation cost to the localCostVector.
localCostVector.push_back(cost); localCostVector.push_back(cost);