|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Species
ec.vector.VectorSpecies
ec.vector.IntegerVectorSpecies
public class IntegerVectorSpecies
IntegerVectorSpecies is a subclass of VectorSpecies with special constraints for integral vectors, namely ByteVectorIndividual, ShortVectorIndividual, IntegerVectorIndividual, and LongVectorIndividual.
IntegerVectorSpecies can specify min/max numeric constraints on gene values in three different ways.
base.min-gene
base.max-gene
Note: you must provide these values even if you don't use them, as they're used as defaults by #2 and #3 below.
base.num-segments The segments may be defined by either start or end indices of genes. This is controlled by specifying the value of:
base.segment-type which can assume the value of start or end, with start being the default. The indices are defined using Java array style, i.e. the first gene has the index of 0, and the last gene has the index of genome-size - 1.
Using this method, each segment is specified byj...
base.segment.j.start
base.segment.j.min-gene
base.segment.j.max-gene
if segment-type value was chosen as start or by:
base.segment.j.end
base.segment.j.min-gene
base.segment.j.max-gene
if segment-type value is equal to end.
base.min-gene.i
base.max-gene.i
Any settings for #3 override #2, and both override #1.
Parameters
base.min-gene long (default=0) |
(the minimum gene value) | |
base.max-gene long >= base.min-gene |
(the maximum gene value) | |
base.min-gene.i long (default=base.min-gene) |
(the minimum gene value for gene i) | |
base.max-gene.i long >= base.min-gene.i (default=base.max-gene) |
(the maximum gene value for gene i) | |
base..num-segments int >= 1 (default=no segments used) |
(the number of gene segments defined) | |
base..segment-type int >= 1 (default=start) |
(defines the way in which segments are defined: either by providing start indices (segment-type=start) or by providing end indices (segment-type=end) | |
base..segment.j.start 0 <= int < genome length |
(the start index of gene segment j -- the end of a segment is before the start of the next segment) | (used when the value of segment-type parameter is equal to start) |
base..segment.j.end 0 <= int < genome length |
(the end of gene segment j -- the start of a segment is after the end of the previous segment) | (used when the value of segment-type parameter is equal to end) |
base..segment.j.min-gene double (default=0.0) |
(the minimum gene value for segment j) | |
base..segment.j.max-gene double >= base..segment.j.min-gene |
(the maximum gene value for segment j) |
Field Summary | |
---|---|
long[] |
maxGenes
|
long[] |
minGenes
|
static java.lang.String |
P_MAXGENE
|
static java.lang.String |
P_MINGENE
|
static java.lang.String |
P_NUM_SEGMENTS
|
static java.lang.String |
P_SEGMENT
|
static java.lang.String |
P_SEGMENT_END
|
static java.lang.String |
P_SEGMENT_START
|
static java.lang.String |
P_SEGMENT_TYPE
|
Fields inherited from class ec.vector.VectorSpecies |
---|
C_ANY_POINT, C_INTERMED_RECOMB, C_LINE_RECOMB, C_ONE_POINT, C_TWO_POINT, chunksize, crossoverProbability, crossoverType, genomeSize, lineDistance, mutationProbability, P_CHUNKSIZE, P_CROSSOVERPROB, P_CROSSOVERTYPE, P_GENOMESIZE, P_LINEDISTANCE, P_MUTATIONPROB, P_VECTORSPECIES, V_ANY_POINT, V_INTERMED_RECOMB, V_LINE_RECOMB, V_ONE_POINT, V_TWO_POINT, warned |
Fields inherited from class ec.Species |
---|
f_prototype, i_prototype, P_FITNESS, P_INDIVIDUAL, P_PIPE, pipe_prototype |
Constructor Summary | |
---|---|
IntegerVectorSpecies()
|
Method Summary | |
---|---|
boolean |
inNumericalTypeRange(long geneVal)
|
long |
maxGene(int gene)
|
long |
minGene(int gene)
|
void |
setup(EvolutionState state,
Parameter base)
The default version of setup(...) loads requested pipelines and calls setup(...) on them and normalizes their probabilities. |
Methods inherited from class ec.vector.VectorSpecies |
---|
defaultBase, newIndividual, warnAboutGene |
Methods inherited from class ec.Species |
---|
clone, newIndividual, newIndividual |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String P_MINGENE
public static final java.lang.String P_MAXGENE
public static final java.lang.String P_NUM_SEGMENTS
public static final java.lang.String P_SEGMENT_TYPE
public static final java.lang.String P_SEGMENT_START
public static final java.lang.String P_SEGMENT_END
public static final java.lang.String P_SEGMENT
public long[] minGenes
public long[] maxGenes
Constructor Detail |
---|
public IntegerVectorSpecies()
Method Detail |
---|
public long maxGene(int gene)
public long minGene(int gene)
public boolean inNumericalTypeRange(long geneVal)
public void setup(EvolutionState state, Parameter base)
Species
setup
in interface Prototype
setup
in interface Setup
setup
in class VectorSpecies
Prototype.setup(EvolutionState,Parameter)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |