bypass repairer calls if the index list is empty in the dispatcher
This commit is contained in:
parent
ebf33d8177
commit
d10325d1ad
1 changed files with 6 additions and 0 deletions
|
|
@ -131,6 +131,7 @@ public:
|
||||||
{
|
{
|
||||||
// std::cout << "in dispatcher, sol = " << sol << std::endl;
|
// std::cout << "in dispatcher, sol = " << sol << std::endl;
|
||||||
|
|
||||||
|
// iterate over { indexe, repairer }
|
||||||
// ipair is an iterator that points on a pair of <indexes,repairer>
|
// ipair is an iterator that points on a pair of <indexes,repairer>
|
||||||
for( typename edoRepairerDispatcher<EOT>::iterator ipair = this->begin(); ipair != this->end(); ++ipair ) {
|
for( typename edoRepairerDispatcher<EOT>::iterator ipair = this->begin(); ipair != this->end(); ++ipair ) {
|
||||||
|
|
||||||
|
|
@ -140,6 +141,8 @@ public:
|
||||||
EOT partsol;
|
EOT partsol;
|
||||||
|
|
||||||
// std::cout << "\tusing indexes = ";
|
// std::cout << "\tusing indexes = ";
|
||||||
|
//
|
||||||
|
// iterate over indexes
|
||||||
// j is an iterator that points on an uint
|
// j is an iterator that points on an uint
|
||||||
for( std::vector< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) {
|
for( std::vector< unsigned int >::iterator j = ipair->first.begin(); j != ipair->first.end(); ++j ) {
|
||||||
|
|
||||||
|
|
@ -151,6 +154,9 @@ public:
|
||||||
// std::cout << std::endl;
|
// std::cout << std::endl;
|
||||||
// std::cout << "\tpartial sol = " << partsol << std::endl;
|
// std::cout << "\tpartial sol = " << partsol << std::endl;
|
||||||
|
|
||||||
|
if( partsol.size() == 0 ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
assert( partsol.size() > 0 );
|
assert( partsol.size() > 0 );
|
||||||
|
|
||||||
// apply the repairer on the partial copy
|
// apply the repairer on the partial copy
|
||||||
|
|
|
||||||
Reference in a new issue