Auto Commit

This commit is contained in:
2020-03-30 11:01:41 -06:00
parent 36df98460a
commit 17e8c14a18

View File

@@ -41,13 +41,13 @@ std::vector<double> MakePermutationMatrix::MakePermutation(std::vector<City> sou
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);
//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++) {
if(localCostVector[i] < lowest[0]) // if(localCostVector[i] < lowest[0])
lowest[0] = localCostVector[i]; // lowest[0] = localCostVector[i];
std::cout << lowest[0] << " "; // std::cout << lowest[0] << " ";
} // }
std::cout<< std::endl; std::cout<< std::endl;
MPI_Gather(&localCostVector,1, MPI_DOUBLE, &returnVector,1, MPI_DOUBLE,0, MPI_COMM_WORLD); MPI_Gather(&localCostVector,1, MPI_DOUBLE, &returnVector,1, MPI_DOUBLE,0, MPI_COMM_WORLD);