|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
LifeSpace is the space where the digital organisms live. Just like the earth for animals in real world.
It has to know two things. It stores the organisms and ensures the access to those. The neighbour-access methods always corrrespond to a certain topology,
which is hidden in the implementation. For example the lifespace can be a two-dimensional toroidal lattice
or a three-dimensional cube or even a one dimensional ring. This class can hide the distributed processing as well.
(Two LifeSpace-s can be connected across the network.)
CRC
1. Stores the digital organisms.
2. Handles the topolgy of the lifespace - DigitalOrganism.
| Method Summary | |
DigitalOrganismIterator |
getAllOrganisms()
This method provides all the organisms of the lifespace. |
DigitalOrganismIterator |
getNeighbours(DigitalOrganism digorg)
This method gives the neighbours of an organism. |
DigitalOrganism |
getOrganismRandomly()
Gives an organism randomly from the entire 'soup'. |
DigitalOrganismIterator |
getRegion(double percentage)
Returns organisms from a connected local territory in the lifespace. |
int |
getSize()
Gives the capacity (the number of cells) of the lifespace. |
DigitalOrganismIterator |
getSomeOrganisms(double percentage)
Returns some organisms. |
void |
injectGenome(GeneticCodeTape ct)
Inserts a genome into the soup. |
| Method Detail |
public DigitalOrganismIterator getAllOrganisms()
public DigitalOrganismIterator getSomeOrganisms(double percentage)
percentage - The percentage of organisms to be returned.public DigitalOrganismIterator getRegion(double percentage)
percentage - The percentage of organisms to be returned.public DigitalOrganism getOrganismRandomly()
public DigitalOrganismIterator getNeighbours(DigitalOrganism digorg)
public int getSize()
public void injectGenome(GeneticCodeTape ct)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||