Is a partition checking constraints?
Usage
is_feasible_solution(
partition,
contiguity = NULL,
sizes = rep(1L, length(partition)),
m = 0,
M = Inf
)
is_regionalisation(partition, contiguity)
Arguments
- partition
Partition vector of the set (numeric vector
composed of non-null integers).
- contiguity
contiguity matrix or graph. If NULL
then the contiguity
constraint is not considered.
- sizes
sizes of the elements (positive values)
- m, M
minimum and maximum size constraints. (positive values)
Value
A flag equals to TRUE
if partition
check the requested
constraints, FALSE
otherwise.