|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.evolvica.engine.AbstractOperator
org.evolvica.core.common.AbstractGeneticOperator
org.evolvica.core.population.AbstractPopulation
Abstract base class for a population. This class provides some common methods for a population.
Field Summary | |
protected IInsertionFilter |
filter
Individual filter for insertion of individuals into this population. |
protected int |
generation
Generation counter. |
protected java.util.Collection |
population
Data structure holding the individuals of this population. |
Fields inherited from class org.evolvica.engine.AbstractOperator |
descriptor, element, id, name |
Constructor Summary | |
AbstractPopulation()
Constructor. |
Method Summary | |
void |
add(IIndividual ind)
Adds an individual to this set. |
void |
add(IIndividual[] array)
Adds the individuals from the array to this set. |
void |
clear()
Removes all individuals from this set. |
boolean |
contains(IIndividual ind)
Checks if the given individual is already contained in this set. |
IInsertionFilter |
getFilter()
|
int |
getGeneration()
Gets the generation counter. |
IIndividualSet |
insert(IIndividualSet iset)
Inserts a set of indidividuals into this population. |
boolean |
isEmpty()
Checks if this set is empty. |
ISetIterator |
iterator()
Returns an iterator over this set. |
java.lang.Object |
process(java.lang.Object input)
Processes a data object. |
void |
remove(IIndividual ind)
Removes the given individual from this set, if it contained in the set. |
void |
remove(IIndividual[] array)
Removes all individuals in the given array from this set. |
void |
replace(IIndividual[] indArray,
IIndividual[] substArray)
Replaces an array of individuals with several substitute indviduals. |
void |
replace(IIndividual ind,
IIndividual subst)
Replaces an individual with a substitute individual. |
void |
setFilter(IInsertionFilter filter)
Sets a new reinsertion operator (filter). |
int |
size()
Returns the number of individuals contained in this set. |
IIndividual[] |
toArray()
Returns the contents of this set as an array. |
Methods inherited from class org.evolvica.engine.AbstractOperator |
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.evolvica.engine.IOperator |
attachDescriptor, attachElement, descriptor, element, getId, getName, setId, setName |
Field Detail |
protected java.util.Collection population
protected int generation
protected IInsertionFilter filter
Constructor Detail |
public AbstractPopulation()
Method Detail |
public void add(IIndividual ind)
IIndividualSet
add
in interface IIndividualSet
ind
- individual to be addedIIndividualSet.add(org.evolvica.core.IIndividual)
public void add(IIndividual[] array)
IIndividualSet
add
in interface IIndividualSet
array
- array with individuals to be addedIIndividualSet.add(org.evolvica.core.IIndividual[])
public void clear()
IIndividualSet
clear
in interface IIndividualSet
IIndividualSet.clear()
public boolean contains(IIndividual ind)
IIndividualSet
contains
in interface IIndividualSet
ind
- individual that should be checked
IIndividualSet.contains(org.evolvica.core.IIndividual)
public boolean isEmpty()
IIndividualSet
isEmpty
in interface IIndividualSet
IIndividualSet.isEmpty()
public ISetIterator iterator()
IIndividualSet
iterator
in interface IIndividualSet
IIndividualSet.iterator()
public void remove(IIndividual ind)
IIndividualSet
remove
in interface IIndividualSet
ind
- individual to be removed from this setIIndividualSet.remove(org.evolvica.core.IIndividual)
public void remove(IIndividual[] array)
IIndividualSet
remove
in interface IIndividualSet
array
- array with individuals to be removedIIndividualSet.remove(org.evolvica.core.IIndividual[])
public int size()
IIndividualSet
size
in interface IIndividualSet
IIndividualSet.size()
public IIndividual[] toArray()
IIndividualSet
toArray
in interface IIndividualSet
IIndividualSet.toArray()
public int getGeneration()
public IInsertionFilter getFilter()
public void setFilter(IInsertionFilter filter)
setFilter
in interface IPopulation
filter
- new reinsertion operatorpublic java.lang.Object process(java.lang.Object input)
IProcessor
process
in interface IProcessor
input
- input data for processing
IProcessor.process(java.lang.Object)
public IIndividualSet insert(IIndividualSet iset)
IPopulation
insert
in interface IPopulation
iset
- individual set to be inserted
IPopulation.insert(org.evolvica.core.IIndividualSet)
public void replace(IIndividual ind, IIndividual subst)
IPopulation
replace
in interface IPopulation
ind
- individual to be replacedsubst
- substitute for the replaced individualIPopulation.replace(org.evolvica.core.IIndividual, org.evolvica.core.IIndividual)
public void replace(IIndividual[] indArray, IIndividual[] substArray)
IPopulation
replace
in interface IPopulation
indArray
- array with individuals to be replacedsubstArray
- array with individual used as substitutionIPopulation.replace(org.evolvica.core.IIndividual[], org.evolvica.core.IIndividual[])
|
Evolvica Core API Version 0.6.2 Last Modified: June 29 2004 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |