islandev
Class ClientRecord
java.lang.Object
|
+--islandev.ClientRecord
- All Implemented Interfaces:
- java.io.Serializable
- public class ClientRecord
- extends java.lang.Object
- implements java.io.Serializable
A client record holds information about the client's current state such as its best individual,
its id (position in the grid) its current generations, next migrating individual, etc... This class
also deals with new information arriving from the client and updates its own data based on it.
It also does other stuff with this information from the client such as logging whole populations
to disk. For this it uses the ibm loggging package. A ClientRecord object is also capable of
painting itself which is used for the IslandsEvoGUI.
- See Also:
- Serialized Form
Constructor Summary |
ClientRecord(java.awt.Point id,
java.lang.String name)
Creates new ClientRecord |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
id
protected java.awt.Point id
name
protected java.lang.String name
justRegistered
protected boolean justRegistered
bestIndividuals
protected java.util.Vector bestIndividuals
migrators
protected java.util.Vector[] migrators
nextMigration
protected int nextMigration
currentGenerations
protected java.util.Vector currentGenerations
currentAvgFitnesses
protected java.util.Vector currentAvgFitnesses
myPanel
protected javax.swing.JPanel myPanel
popLogger
protected transient com.ibm.logging.MessageLogger popLogger
fileLog
protected transient com.ibm.logging.FileHandler fileLog
lastPopLogFileName
protected transient java.lang.String lastPopLogFileName
ClientRecord
public ClientRecord(java.awt.Point id,
java.lang.String name)
- Creates new ClientRecord
refreshLog
public void refreshLog()
startLog
public void startLog()
stopLog
public void stopLog()
handleReport
public void handleReport(java.util.Vector report)
- format is
0: best genotype
1: int of current generation
2: double of average fitness
getNextMigration
public int getNextMigration()
migrateOut
public void migrateOut(java.util.Vector indivs)
cycleMigration
public void cycleMigration()
getMigrators
public java.util.Vector getMigrators(int direction)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getBestIndividuals
public java.util.Vector getBestIndividuals()
getGenerations
public java.util.Vector getGenerations()
getAvgFitnesses
public java.util.Vector getAvgFitnesses()
getName
public java.lang.String getName()
getID
public java.awt.Point getID()
getPanel
public javax.swing.JPanel getPanel()
setCurrentGenerations
public void setCurrentGenerations(int[] currGen)
setJustRegistered
public void setJustRegistered(boolean value)
getJustRegistered
public boolean getJustRegistered()