|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.coevolution.competitors.CoevolutionCompetitorList
public class CoevolutionCompetitorList
This class maintains a list of competitors per population for a coevolution problem. It could also be used to represent a HOF.
Constructor Summary | |
---|---|
CoevolutionCompetitorList()
|
|
CoevolutionCompetitorList(CoevolutionCompetitorList other)
|
|
CoevolutionCompetitorList(int numberOfEntitiesPerList)
|
Method Summary | |
---|---|
void |
addCompetitor(Competitor competitor)
Add a competitor to the list of population competitors. |
void |
addCompetitorList(int populationID,
List<Competitor> list)
Add a list of Competitor's to specific PopulationCompetitorList |
void |
addCompetitorList(PopulationCompetitorList list)
Add a PopulationCompetitorList to this CoevolutionCompetitorList |
CoevolutionCompetitorList |
getClone()
Create a cloned copy of the current object and return it. |
Competitor |
getCompetitor(int listIndex,
int populationIndex)
|
List<Competitor> |
getCompetitorsFromSubList(int index)
get one entry from each list at index |
int |
getNumberOfCompetitors(int index)
|
int |
getNumberOfEntitesPerList()
|
int |
getNumberOfLists()
|
int |
getPopulationID(int index)
|
void |
merge(CoevolutionCompetitorList other)
Merge another CoevolutionCompetitorList into this one |
void |
removeCompetitor(int listIndex,
int populationIndex)
|
void |
removeSubList(int index)
Remove the PopulationCompetitorList with the specified index |
void |
setNumberofEntitiesPerList()
|
void |
updatePopulationID(int index,
int oldPopulationID,
int newPopulationID)
Change the populationID for a PopulationCompetitorList, if the new population already exists, update the population ID's of the Competitor's and merge them with the existing PopulationCompetitorList, |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.cilib.type.types.Type |
---|
equals, hashCode |
Constructor Detail |
---|
public CoevolutionCompetitorList()
public CoevolutionCompetitorList(int numberOfEntitiesPerList)
public CoevolutionCompetitorList(CoevolutionCompetitorList other)
Method Detail |
---|
public void addCompetitorList(PopulationCompetitorList list)
list
- The competitorspublic void addCompetitorList(int populationID, List<Competitor> list)
populationID
- The ID of the population these competitors are fromlist
- The list of competitorspublic void merge(CoevolutionCompetitorList other)
other
- The list to mergepublic void addCompetitor(Competitor competitor)
competitor
- The Competitor to addpublic List<Competitor> getCompetitorsFromSubList(int index)
index
- the specified index which relates to a population ID
public void removeSubList(int index)
index
- public int getNumberOfEntitesPerList()
public void setNumberofEntitiesPerList()
public int getNumberOfLists()
public int getPopulationID(int index)
public int getNumberOfCompetitors(int index)
public Competitor getCompetitor(int listIndex, int populationIndex)
public void removeCompetitor(int listIndex, int populationIndex)
public void updatePopulationID(int index, int oldPopulationID, int newPopulationID)
index
- the index in the array to updateoldPopulationID
- the old populationIDnewPopulationID
- the new populationIDpublic CoevolutionCompetitorList getClone()
getClone
in interface Type
getClone
in interface Cloneable
Object.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |