mirror of
https://github.com/rmontanana/mdlp.git
synced 2025-08-21 02:15:57 +00:00
Fix tests, samples and remove uneeded support files
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user