|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.coevolution.score.EntityScoreboard
public class EntityScoreboard
This class provides a means of keeping a competition history of one specific entity within a CoevolutionAlgorithm.
Constructor Summary | |
---|---|
EntityScoreboard()
Create a default score board. |
|
EntityScoreboard(EntityScoreboard copy)
Create a copy of the provided instance. |
Method Summary | |
---|---|
void |
clearScoreBoard()
|
boolean |
equals(Object obj)
Compare the specified object with this type for equality. |
EntityScoreboard |
getClone()
Create a cloned copy of the current object and return it. |
int |
getCompeteCount()
Get the number of times the entity assosiated with this score board has competed. |
int |
getCompeteCount(int round)
|
int |
getDrawCount()
Get the number of times the entity this score board is used for has drawn. |
ArrayList<Fitness> |
getDrawScores(int round)
Get all the Fitness values for games drawn by this entity for the specified round |
int |
getLoseCount()
Get the number of times the entity this score board is used for has lost. |
ArrayList<Fitness> |
getLoseScores(int round)
Get all the Fitness values for games lost by this entity for the specified round |
double |
getPercentageWon()
Get the percentage of games won from the total games played |
ArrayList<EntityScore> |
getScores()
Get a list of all the Scores for this entity |
ArrayList<Fitness> |
getScores(int round)
Get all the Fitness values for all games played by this entity for the specified round |
int |
getWinCount()
Get the number of times the entity this score board is used for has won. |
int |
getWinCount(int round)
|
ArrayList<Fitness> |
getWinScores(int round)
Get all the Fitness values for games Won by this entity for the specified round |
int |
hashCode()
Returns the hash code value for this list. |
void |
mergeEntityScore(EntityScore scoreBoard)
Merge the given EntityScore into this scoreboard |
void |
removeScores(int round)
Remove all the scores from a specified round |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityScoreboard()
public EntityScoreboard(EntityScoreboard copy)
copy
- The instance to copy.Method Detail |
---|
public EntityScoreboard getClone()
getClone
in interface Type
getClone
in interface Cloneable
Object.clone()
public boolean equals(Object obj)
true
if and only if the specified object is also an instance
of the same type.
equals
in interface Type
equals
in class Object
obj
- The object to compare.
true
if equality exists, false
otherwise.Object.equals(Object)
public int hashCode()
int hashCode = 7; Iterator<E> i = list.iterator(); while (i.hasNext()) { E obj = i.next(); hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode()); }This ensures that type1.equals(type2) implies that type1.hashCode()==type2.hashCode() for any two types, type1 and type2, as required by the general contract of
Object.hashCode()
.
hashCode
in interface Type
hashCode
in class Object
Object.equals(Object)
,
Type.equals(Object)
public ArrayList<EntityScore> getScores()
public int getWinCount()
public int getWinCount(int round)
public int getLoseCount()
public int getDrawCount()
public int getCompeteCount()
public int getCompeteCount(int round)
public void mergeEntityScore(EntityScore scoreBoard)
scoreBoard
- public ArrayList<Fitness> getWinScores(int round)
round
-
public ArrayList<Fitness> getDrawScores(int round)
round
-
public ArrayList<Fitness> getLoseScores(int round)
round
-
public ArrayList<Fitness> getScores(int round)
round
-
public double getPercentageWon()
public void clearScoreBoard()
public void removeScores(int round)
round
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |