Auto Commit

This commit is contained in:
2020-03-30 18:09:14 -06:00
parent ed8f880559
commit 0159e832de

View File

@@ -15,13 +15,13 @@ std::vector<double> MakePermutationMatrix::MakePermutation(std::vector<City> sou
std::vector<City> myPerm = source;
std::vector<City> nextPerm = source;
// if(!rank){
// size_t totalNumPermutations = 1;
// for(size_t i = 1; i <= source.size(); i++)
// totalNumPermutations *= i;
// offset = totalNumPermutations/size;
// std::cout << "offset: "<<offset <<std::endl;
// }
if(!rank){
size_t totalNumPermutations = 1;
for(size_t i = 1; i <= source.size(); i++)
totalNumPermutations *= i;
offset = totalNumPermutations/size;
std::cout << "offset: "<<offset <<std::endl;
}
//MPI_Bcast(&offset, 1, MPI_LONG_LONG_INT, 0, MPI_COMM_WORLD);
@@ -34,7 +34,7 @@ std::vector<double> MakePermutationMatrix::MakePermutation(std::vector<City> sou
//rotate my perm.
std::rotate(myPerm.begin(), myPerm.begin()+offset*rank,myPerm.end());
std::cout << "source.last(): " << source[8].GetName() << std::endl;
//std::cout << "source.last(): " << source[8].GetName() << std::endl;
std::cout << "source: ";
for(int i = 0; i < source.size(); i++){
std::cout << source[i].GetName() << " ";