bypass repairer calls if the index list is empty in the dispatcher

This commit is contained in:
nojhan 2012-01-12 16:49:50 +01:00
commit d10325d1ad

View file

@ -131,6 +131,7 @@ public:
{
// std::cout << "in dispatcher, sol = " << sol << std::endl;
// iterate over { indexe, 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 ) {
@ -140,6 +141,8 @@ public:
EOT partsol;
// std::cout << "\tusing indexes = ";
//
// iterate over indexes
// j is an iterator that points on an uint
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 << "\tpartial sol = " << partsol << std::endl;
if( partsol.size() == 0 ) {
continue;
}
assert( partsol.size() > 0 );
// apply the repairer on the partial copy