Fix tests, samples and remove uneeded support files

This commit is contained in:
2024-07-03 18:13:22 +02:00
parent d90e21ec4c
commit fcbd05d842
18 changed files with 426 additions and 997 deletions

View File

@@ -12,7 +12,7 @@ namespace mdlp {
max_depth(max_depth_),
proposed_cuts(proposed)
{
direction = bound_dir_t::LEFT;
direction = bound_dir_t::RIGHT;
}
size_t CPPFImdlp::compute_max_num_cut_points() const
@@ -21,11 +21,11 @@ namespace mdlp {
if (proposed_cuts == 0) {
return numeric_limits<size_t>::max();
}
if (proposed_cuts < 0 || proposed_cuts > static_cast<float>(X.size())) {
if (proposed_cuts < 0 || proposed_cuts > static_cast<precision_t>(X.size())) {
throw invalid_argument("wrong proposed num_cuts value");
}
if (proposed_cuts < 1)
return static_cast<size_t>(round(static_cast<float>(X.size()) * proposed_cuts));
return static_cast<size_t>(round(static_cast<precision_t>(X.size()) * proposed_cuts));
return static_cast<size_t>(proposed_cuts); // The 2 extra cutpoints should not be considered here as this parameter is considered before they are added
}