Skip to content

Commit

Permalink
initializing k properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mzed committed Nov 4, 2024
1 parent 6ce85a2 commit 6ac04a8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ class rapid_classification : public object<rapid_classification>
setter { MIN_FUNCTION {
const std::vector<int> current { classificationModels.getK() };
const int newK { static_cast<int>(atom_getlong(&args[0])) };

if (current.size() > 0 && newK != current[0])
{
classificationModels.setK(0, newK);
for (int model {}; model < current.size(); model++) classificationModels.setK(model, newK);
}

return args;
}}
};
Expand Down

0 comments on commit 6ac04a8

Please sign in to comment.