Constructs a linear Scalarizer, which performs linear scalarization for ScalorFixedProjection.

scalarizer_linear()

Value

a Scalarizer object.

See also

Other Scalarizers: Scalarizer, scalarizer_chebyshev()

Examples

# fitnesses: three rows (i.e. thee indivs) with two objective values each
fitnesses <- matrix(0:5, ncol = 2)

# weights: contains one matrix for each row of 'fitnesses' (i.e. each indiv)
# which get multiplied with their respective row.
weights <- list(
 matrix(c(1, 0, 0, 1), ncol = 2),
 matrix(c(1, 2, 0, 0), ncol = 2),
 matrix(c(0, 1, 0, 1), ncol = 2)
)

sc <- scalarizer_linear()

# The resulting row-vectors are the different scalarizations according to the
# columns in the 'weights' matrices.
sc(fitnesses, weights)
#>      [,1] [,2]
#> [1,]    0    3
#> [2,]    9    0
#> [3,]    5    5