public class Selector
extends java.lang.Object
Class Selector. It represents several selection methods: ordered, roulette and tournament
Constructor and Description |
---|
Selector()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
static int |
Ordered(double[] fitness,
int k,
int n)
Ordered selection method
|
static int |
Roulette(double[] fitness,
int n,
SetupParameters global)
Roulette selection method
|
static int |
Tournament(double[] fitness,
int n_ops,
int n,
SetupParameters global)
Tournament selection method
|
public static int Ordered(double[] fitness, int k, int n)
Ordered selection method
fitness
- Fitness arrayk
- Individual indexn
- Number of individualspublic static int Roulette(double[] fitness, int n, SetupParameters global)
Roulette selection method
fitness
- Fitness arrayn
- Number of individualsglobal
- Global Definition parameterspublic static int Tournament(double[] fitness, int n_ops, int n, SetupParameters global)
Tournament selection method
fitness
- Fitness arrayn_ops
- Number of individuals selectedn
- Number of individualsglobal
- Global Definition parameters