|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Population
Interface for a population. The population contains the individuals
Method Summary | |
---|---|
void |
add(Individual i)
Add an individual to the population |
void |
addAll(java.util.Collection<Individual> immigrants)
Add a collection of individuals to the population |
void |
addAll(Population pop)
Add an entire population to the population |
void |
clear()
Clear the population of all individuals |
boolean |
contains(Individual individual)
Check if the individual is contained in the population |
Individual |
get(int index)
Get an individual from the specified index |
java.util.List<Individual> |
getAll()
Get a list of all the individuals |
java.util.Iterator<Individual> |
iterator()
Get an iterator over the population |
void |
remove(Individual ind)
Remove individual from population |
int |
size()
The number of individuals in the population |
void |
sort()
Sort the individuals in the population |
Method Detail |
---|
void sort()
java.util.Iterator<Individual> iterator()
int size()
void addAll(java.util.Collection<Individual> immigrants)
immigrants
- collection of individualsvoid addAll(Population pop)
pop
- population to addjava.util.List<Individual> getAll()
boolean contains(Individual individual)
individual
- individual to compare
void add(Individual i)
i
- individual to addIndividual get(int index)
index
- which individual to return
void clear()
void remove(Individual ind)
ind
- individual to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |