public abstract class Genotype
extends java.lang.Object
Genotype is the base clase to represent the genotype of any GeneticIndividual.
This class is inherit by the following classes: GenotypeFuzzyGAP
,
GenotypeFuzzyGP
, GenotypeFuzzyGPRegSym
, and
GenotypePitts
.
Modifier and Type | Field and Description |
---|---|
static Randomize |
rand
Genotype is the base clase to represent the genotype of any GeneticIndividual.
|
Constructor and Description |
---|
Genotype(Randomize r)
Class constructor with the following parameters:
|
Modifier and Type | Method and Description |
---|---|
abstract Genotype |
clone()
abstract method for generating a perfect copy of the current Genotype.
|
abstract void |
crossover(Genotype parent,
Genotype ofs1,
Genotype ofs2,
int crossoverID)
abstract method for carrying out the crossover genetic operations.
|
abstract void |
debug()
abstract method for printing debug information.
|
abstract boolean |
isRelated(Genotype g)
abstract method for determining if the given
Genotype is similar to current one. |
abstract void |
mutation(double alpha,
int mutationID)
abstract method for carrying out the mutation genetic operations.
|
abstract void |
Random()
abstract method to randomly initialize a Genotype and then the corresponding individual.
|
public static Randomize rand
Genotype is the base clase to represent the genotype of any GeneticIndividual.
This class is inherit by the following classes: GenotypeFuzzyGAP
,
GenotypeFuzzyGP
, GenotypeFuzzyGPRegSym
, and
GenotypePitts
.
public abstract void crossover(Genotype parent, Genotype ofs1, Genotype ofs2, int crossoverID) throws invalidCrossover
abstract method for carrying out the crossover genetic operations.
parent
- the second parent in the crossover operation, it's an Genotype
objectofs1
- the Genotype
object with the first offspringofs2
- the Genotype
object with the second offspringcrossoverID
- an int with the crossover operation to be carried out. Refer to inherited classes for
specification of the valid valuesinvalidCrossover
- if crossoverID is not validpublic abstract void Random()
abstract method to randomly initialize a Genotype and then the corresponding individual.
public abstract void mutation(double alpha, int mutationID) throws invalidMutation
abstract method for carrying out the mutation genetic operations.
alpha
- double needed for some kind of mutations. Refer to inherited classes for
specification of the valid values.mutationID
- an int with the mutation operation to be carried out. Refer to inherited classes for
specification of the valid values.invalidMutation
- if mutationID is not validpublic abstract Genotype clone()
abstract method for generating a perfect copy of the current Genotype.
clone
in class java.lang.Object
Genotype
which is a perfect copy of current individualpublic abstract void debug()
abstract method for printing debug information.