JGAP

org.jgap.distr.grid.gp
Class JGAPResultGP

java.lang.Object
  extended by WorkResult
      extended by org.jgap.distr.grid.gp.JGAPResultGP

public class JGAPResultGP
extends WorkResult

Holds the result of a worker.

Since:
3.1

Constructor Summary
JGAPResultGP(java.lang.String a_sessionName, java.lang.String a_id, int a_chunk, GPPopulation a_programs, long a_unitdone)
          Constructor: Takes a population as result of a worker's computation.
JGAPResultGP(java.lang.String a_sessionName, java.lang.String a_id, int a_chunk, IGPProgram a_fittestProg, long a_unitdone)
          Deprecated. use other constructor with GPPopulation parameter instead
 
Method Summary
 void clearFittest()
          Clear the fittes program.
 int getChunk()
           
 java.lang.String getDescription()
           
 long getDurationComputation()
           
 IGPProgram getFittest()
          Deprecated. use getPopulation instead
 java.lang.Object getGenericData()
           
 java.lang.String getID()
           
 GPPopulation getPopulation()
           
 java.util.Date getResponseDate()
           
 java.lang.String getTitle()
           
 long getUnitDone()
           
 MasterInfo getWorkerInfo()
           
 void setDescription(java.lang.String a_descr)
           
 void setDurationComputation(long a_durationComputation)
           
 void setGenericData(java.lang.Object a_genericData)
          Adds arbitrary generic data to the result.
 void setResponseDate(java.util.Date a_date)
           
 void setTitle(java.lang.String a_title)
           
 void setWorkerInfo(MasterInfo a_workerInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JGAPResultGP

public JGAPResultGP(java.lang.String a_sessionName,
                    java.lang.String a_id,
                    int a_chunk,
                    IGPProgram a_fittestProg,
                    long a_unitdone)
Deprecated. use other constructor with GPPopulation parameter instead

Constructor: Takes the fittest program determined as result of a worker's computation.

Parameters:
a_sessionName - arbitrary session name to distinct from other results
a_id - ID of the result, should be unique
a_chunk - running index of request chunk, should be unique within an identification
a_fittestProg - the fittest program determined
a_unitdone - number of units done

JGAPResultGP

public JGAPResultGP(java.lang.String a_sessionName,
                    java.lang.String a_id,
                    int a_chunk,
                    GPPopulation a_programs,
                    long a_unitdone)
Constructor: Takes a population as result of a worker's computation.

Parameters:
a_sessionName - arbitrary session name to distinct from other results
a_id - ID of the result, should be unique
a_chunk - running index of request chunk, should be unique within an identification
a_programs - the result of a worker's computation
a_unitdone - number of units done
Since:
3.2
Method Detail

getFittest

public IGPProgram getFittest()
Deprecated. use getPopulation instead

Returns:
IGPProgram the fittest program known

getPopulation

public GPPopulation getPopulation()
Returns:
the GPPopulation as a result from a worker's computation
Since:
3.2

getUnitDone

public long getUnitDone()

setGenericData

public void setGenericData(java.lang.Object a_genericData)
Adds arbitrary generic data to the result.

Parameters:
a_genericData - arbitrary generic data
Since:
3.3.3

getGenericData

public java.lang.Object getGenericData()
Returns:
generic data contained in the result.
Since:
3.3.3

getChunk

public int getChunk()

getWorkerInfo

public MasterInfo getWorkerInfo()
Returns:
information about the worker
Since:
3.3.3

setWorkerInfo

public void setWorkerInfo(MasterInfo a_workerInfo)
Parameters:
a_workerInfo - set information about the worker
Since:
3.3.3

getID

public java.lang.String getID()

setResponseDate

public void setResponseDate(java.util.Date a_date)
Parameters:
a_date - date the response was computed
Since:
3.3.3

getResponseDate

public java.util.Date getResponseDate()
Returns:
the date the response was computed
Since:
3.3.3

setDescription

public void setDescription(java.lang.String a_descr)
Parameters:
a_descr - arbitrary description of the result
Since:
3.3.3

getDescription

public java.lang.String getDescription()
Returns:
arbitrary description of the result
Since:
3.3.3

getDurationComputation

public long getDurationComputation()

setDurationComputation

public void setDurationComputation(long a_durationComputation)

setTitle

public void setTitle(java.lang.String a_title)
Parameters:
a_title - the title to set
Since:
3.3.4

getTitle

public java.lang.String getTitle()
Returns:
the title set
Since:
3.3.4

clearFittest

public void clearFittest()
Clear the fittes program.

Since:
3.3.4

JGAP