A minor change to avoid unnecessary work when not using a cutting plane cache.

This commit is contained in:
Davis King 2012-12-09 14:01:17 -05:00
parent 81d82faca9
commit 49ffb86036
1 changed files with 1 additions and 1 deletions

View File

@ -295,7 +295,7 @@ namespace dlib
if (current_risk_gap < eps)
should_stop = true;
if (should_stop && !skip_cache)
if (should_stop && !skip_cache && max_cache_size != 0)
{
// Instead of stopping we shouldn't use the cache on the next iteration. This way
// we can be sure to have the best solution rather than assuming the cache is up-to-date