Learn R Programming

GPareto (version 1.1.8)

nonDomSet: Non-dominated points with respect to a reference

Description

Determines which elements in a set are dominated by reference points

Usage

nonDomSet(points, ref)

Arguments

points

matrix (one point per row) that are compared to a reference ref (i.e., not between themselves)

ref

matrix (one point per row) of reference (faster if they are already Pareto optimal)

Examples

Run this code
if (FALSE) {
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)
}

Run the code above in your browser using DataLab