Commit 9b0ef7bb authored by berak's avatar berak

ml: fix caching of internal state when changing the impl in KNearest

parent 7b36e575
......@@ -437,7 +437,16 @@ public:
{
if (val != BRUTE_FORCE && val != KDTREE)
val = BRUTE_FORCE;
int k = getDefaultK();
int e = getEmax();
bool c = getIsClassifier();
initImpl(val);
setDefaultK(k);
setEmax(e);
setIsClassifier(c);
}
public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment