diff --git a/HW10/MakePermutationMatrix.cpp b/HW10/MakePermutationMatrix.cpp index e5cdba3..7f4370c 100644 --- a/HW10/MakePermutationMatrix.cpp +++ b/HW10/MakePermutationMatrix.cpp @@ -30,10 +30,13 @@ std::vector MakePermutationMatrix::MakePermutation(std::vector sou //Add up the cost of the current permutation. for (int i = 1; i < myPerm.size(); i++) { cost += costMatrix[myPerm[i].GetName()][myPerm[i-1].GetName()]; + std::cout << myPerm[i].GetName() << " "; } + std::cout << std::endl; //Push permutation cost to the localCostVector. localCostVector.push_back(cost); } while (std::next_permutation(myPerm.begin(), myPerm.end()), myPerm != nextPerm); + //find the lowest and add it to a lowest vector. auto lowest = std::vector(1,localCostVector[0]); for(int i = 0; i < localCostVector.size(); i++) {