rmoo_tourSelection: Tournament Selection

View source: R/geneticoperator.R

rmoo_tourSelectionR Documentation

Tournament Selection

Description

Binarily o por pref

Usage

rmoo_tourSelection(object, k = 2, ...)

rmooreal_tourSelection(object, k = 2, ...)

rmoobin_tourSelection(object, k = 2, ...)

rmooperm_tourSelection(object, k = 2, ...)

Arguments

object

MOEA object with slots population, fitness, front, popSize.

k

Tournament size.

...

Argument which all the values necessary for the configuration will be passed as parameters. The user is encouraged to see the documentations.

Value

List with population and fitness subsets.

Examples

## Not run: 
# Creamos un "dummy" objeto mínimo
object <- list(
  population       = matrix(runif(20), nrow=5),
  fitness          = matrix(runif(10), nrow=5),
  front            = matrix(sample(1:2, 5, TRUE), ncol=1),
  crowdingDistance = runif(5),
  popSize          = 5
)
class(object) <- "nsga2"
# Llamamos al selector
sel <- rmoo_tourSelection(object, k = 2)
str(sel)

## End(Not run)

rmoo documentation built on May 4, 2026, 1:06 a.m.