|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.coevolution.competitors.PopulationCompetitorList
public class PopulationCompetitorList
This class represents a list of Competitor's with the same populationID
Constructor Summary | |
---|---|
PopulationCompetitorList(int populationID)
|
|
PopulationCompetitorList(int populationID,
List<Competitor> competitors)
|
|
PopulationCompetitorList(PopulationCompetitorList other)
|
Method Summary | |
---|---|
void |
addCompetitor(Competitor competitor)
Add a Competitor to this list |
void |
addCompetitors(List<Competitor> competitors)
Add a List of Competitor's to this list |
void |
changePopulationID(int oldPopulationID,
int newPopulationID)
Change the population ID of this list |
void |
clear()
|
PopulationCompetitorList |
getClone()
Create a cloned copy of the current object and return it. |
Competitor |
getCompetitor(int index)
Return the Competitor at the specified index in the list |
int |
getPopulationID()
get the populationID of the Competitor's in this object |
void |
merge(PopulationCompetitorList other)
Merge this list with the specified list |
void |
removeCompetitor(int index)
Remove the Competitor at the specified index in the list |
void |
replaceWorst(Competitor newCompetitor)
Search through the Competitor for the lowest fitness and replace it with newCompetitor if its fitness is better |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PopulationCompetitorList(int populationID)
public PopulationCompetitorList(int populationID, List<Competitor> competitors)
public PopulationCompetitorList(PopulationCompetitorList other)
Method Detail |
---|
public Competitor getCompetitor(int index)
index
- The index in the list
public void removeCompetitor(int index)
index
- public int size()
public void addCompetitor(Competitor competitor)
competitor
- public void replaceWorst(Competitor newCompetitor)
newCompetitor
- the new competitor to potentially addpublic void addCompetitors(List<Competitor> competitors)
competitors
- public void changePopulationID(int oldPopulationID, int newPopulationID)
oldPopulationID
- The original populationIDnewPopulationID
- The new populationIDpublic void merge(PopulationCompetitorList other)
other
- public void clear()
public PopulationCompetitorList getClone()
getClone
in interface Cloneable
Object.clone()
public int getPopulationID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |