fixed trim_weights in boosting (thanks to frankman for the patch; ticket #1231)

This commit is contained in:
Vadim Pisarevsky 2011-07-22 12:20:43 +00:00
parent 216fbc004a
commit b700521b95

View File

@ -1439,7 +1439,7 @@ CvBoost::trim_weights()
for( i = 0; i < count; i++ )
{
double w = weak_eval->data.db[i];
if( sum > w )
if( sum <= 0 )
break;
sum -= w;
}