nonDom {GPGame} | R Documentation |
Extract non-dominated points from a set, or with respect to a reference Pareto front
nonDom(points, ref = NULL, return.idx = FALSE)
points |
matrix (one point per row) from which to extract non-dominated points, or,
if a reference |
ref |
matrix (one point per row) of reference (faster if they are already Pareto optimal) |
return.idx |
if |
Use Kung non-domination sorting
Non-dominated points from points
, unless a ref
is provided, in which case return points from points
non-dominated by ref
.
If return.idx
is TRUE
, only returns indices
Kung, H. T., Luccio, F., & Preparata, F. P. (1975). On finding the maxima of a set of vectors. Journal of the ACM (JACM), 22(4), 469-476.
d <- 6
n <- 1000
n2 <- 1000
test <- matrix(runif(d * n), n)
ref <- matrix(runif(d * n), n)
indPF <- nonDom(ref, return.idx = TRUE)
all(nonDom(ref) == ref[indPF,])
system.time(res <- nonDom(test, ref[indPF,,drop = FALSE], return.idx = TRUE))