Skip to content
Snippets Groups Projects
Commit e486b8f7 authored by Caron Olivier's avatar Caron Olivier
Browse files

remove debug messages

parent 5ed0cc30
No related branches found
No related tags found
No related merge requests found
Pipeline #4330 failed
......@@ -57,7 +57,6 @@ namespace opt::manySolutions::geneticAlgorithm::crossover {
unsigned long long int size = _ind1.size();
unsigned int len = util::RNGHelper::get()->random(size);
unsigned int position = util::RNGHelper::get()->random(size - len);
std::cout << "len:" << len << "pos:" << position << std::endl;
INDIVIDUAL child1;
INDIVIDUAL child2;
for (unsigned long long int i = 0, i1 = 0, i2 = 0; i < size; i++) {
......@@ -67,7 +66,6 @@ namespace opt::manySolutions::geneticAlgorithm::crossover {
} else {
while (std::find(_ind1.begin() + position+1, (_ind1.begin() + position + len+1), _ind2[i2])
!= (_ind1.begin() + position + len+1)) i2++;
std::cout << "i:" << i << " - i2:" << i2 << std::endl ;
child1.push_back(_ind2[i2]);
i2++;
while (std::find(_ind2.begin() + position+1, (_ind2.begin() + position + len+1), _ind1[i1])
......
......@@ -49,7 +49,6 @@ namespace test {
vector<unsigned long long int> expectedChild1 = {9, 8, 2, 3, 4, 5, 6, 7, 1, 0};
vector<unsigned long long int> expectedChild2 = {0, 1, 7, 6, 5, 4, 3, 2, 8, 9} ;
for (unsigned long long int i = 0 ; i < 10; i++) {
std::cout << i << " first:" << pair.first[i] << " second:" << pair.second[i] << std::endl;
ASSERT_EQ(pair.first[i], expectedChild1[i]) ;
ASSERT_EQ(pair.second[i], expectedChild2[i]) ;
}
......
......@@ -57,7 +57,6 @@ namespace test {
vector<unsigned long long int> expectedChild1 = {0, 1, 2, 3, 4, 5, 3, 2, 1 , 0};
vector<unsigned long long int> expectedChild2 = {9, 8, 7, 6, 5 , 4 , 6, 7, 8, 9} ;
for (unsigned long long int i = 0 ; i < 10; i++) {
std::cout << i << " first:" << pair.first[i] << " second:" << pair.second[i] << std::endl;
ASSERT_EQ(pair.first[i], expectedChild1[i]) ;
ASSERT_EQ(pair.second[i], expectedChild2[i]) ;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment