Learn R Programming

GPGame (version 1.2.1)

nonDom: Generic non-domination computation

Description

Extract non-dominated points from a set, or with respect to a reference Pareto front

Usage

nonDom(points, ref = NULL, return.idx = FALSE)

Value

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

Arguments

points

matrix (one point per row) from which to extract non-dominated points, or, if a reference ref is provided, non-dominated points with respect to ref

ref

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

return.idx

if TRUE, return indices instead of points

Details

Use Kung non-domination sorting

References

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.

Examples

Run this code
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))

Run the code above in your browser using DataLab