which_dominated: Determine which points of a set are (non)dominated

Description Usage Arguments Value See Also Examples

View source: R/moo_domination.R

Description

Given a matrix with one point per column, which_dominated returns the column numbers of the dominated points and which_nondominated the column numbers of the non-dominated points. Function is_maximally_dominated returns a logical vector with TRUE for each point which is located on the last non-domination level.

Usage

1
2
3
4
5

Arguments

x

[matrix]
Numeric (m \times n) matrix where n is the number of points and m is the number of objectives.

Value

Integer vector of positions of (non-)dominated points.

See Also

Other Pareto-dominance checks: dominated(), dominates(), set_dominates()

Other multi-objective tools: dominated(), dominates(), set_dominates()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(mtcars)
# assume we want to maximize horsepower and minimize gas consumption
cars = mtcars[, c("mpg", "hp")]
cars$hp = -cars$hp
idxs = which_nondominated(t(as.matrix(cars)))
## Not run: 
print(mtcars[idxs, ])
plot(cars)
points(cars[idxs, ], col = "tomato", pch = 10)

## End(Not run)

jakobbossek/ecr3vis documentation built on Dec. 20, 2021, 9 p.m.