Auto Commit

This commit is contained in:
2020-03-30 15:40:46 -06:00
parent b546578945
commit 6a46a175f7

View File

@@ -37,7 +37,7 @@ std::vector<double> MakePermutationMatrix::MakePermutation(std::vector<City> sou
std::cout << std::endl; std::cout << std::endl;
do { do {
double cost = 0; double cost = 0;
std::cout << "myPerm: "; std::cout <<"Rank: " << rank << " myPerm: ";
for(int i = 0; i < myPerm.size(); i++){ for(int i = 0; i < myPerm.size(); i++){
std::cout << myPerm[i].GetName() << " "; std::cout << myPerm[i].GetName() << " ";
} }
@@ -48,7 +48,7 @@ std::vector<double> MakePermutationMatrix::MakePermutation(std::vector<City> sou
cost += costMatrix[myPerm[i].GetName()][myPerm[i-1].GetName()]; cost += costMatrix[myPerm[i].GetName()][myPerm[i-1].GetName()];
} }
std::cout << "cost: " << cost <<std::endl; // std::cout << "cost: " << cost <<std::endl;
//Push permutation cost to the localCostVector. //Push permutation cost to the localCostVector.
localCostVector.push_back(cost); localCostVector.push_back(cost);
} while (std::next_permutation(myPerm.begin(), myPerm.end()) && myPerm!=nextPerm ); } while (std::next_permutation(myPerm.begin(), myPerm.end()) && myPerm!=nextPerm );