nonDomSet | R Documentation |
Determines which elements in a set are dominated by reference points
nonDomSet(points, ref)
points |
matrix (one point per row) that are compared to a reference |
ref |
matrix (one point per row) of reference (faster if they are already Pareto optimal) |
## Not run:
d <- 6
n <- 1000
n2 <- 1000
test <- matrix(runif(d * n), n)
ref <- matrix(runif(d * n), n)
indPF <- which(!is_dominated(t(ref)))
system.time(res <- nonDomSet(test, ref[indPF,,drop = FALSE]))
res2 <- rep(NA, n2)
library(emoa)
t0 <- Sys.time()
for(i in 1:n2){
res2[i] <- !is_dominated(t(rbind(test[i,, drop = FALSE], ref[indPF,])))[1]
}
print(Sys.time() - t0)
all(res == res2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.