Closed
Description
Follow-up to #347
This should not be possible since there are no integer values left if the range is 0 to 1 and exclusive of the borders. We should require inclusive = c(TRUE, TRUE)
since setting one border to exclusive still only leave a single value which is not useful for tuning.
library(dials)
#> Loading required package: scales
# this should not be possible
int_non_incl <- new_quant_param(
type = "integer",
range = c(0, 1),
inclusive = c(FALSE, FALSE),
trans = NULL,
label = c(param_non_incl = "some label"),
finalize = NULL
)
# because it enables this
value_sample(int_non_incl, n = 3)
#> [1] 0 0 0
value_seq(int_non_incl, n = 3)
#> [1] 0 1
Created on 2025-01-30 with reprex v2.1.1