es.udc.gii.common.eaf.log.parallel
Class BestIndividualLogTool
java.lang.Object
es.udc.gii.common.eaf.log.LogTool
es.udc.gii.common.eaf.log.parallel.ParallelLogTool
es.udc.gii.common.eaf.log.parallel.BestIndividualLogTool
- All Implemented Interfaces:
- Configurable, java.util.Observer
public class BestIndividualLogTool
- extends ParallelLogTool
A parallel log tool for logging the best individuals of a population.
Configuration:
<Number>...</Number>
The Number
parameter states how many individuals are logged. So if
it were 3, the 3 best individuals would be logged.
The output reads as follows:
[ GENERATION ... ]
Best individual(s) (...)
...
The "...
" are replaced by the number of generations so far, the
number of individuals logged and those best individuals repectively.
In an island model this log tool logs each population of each island in an
independent file. For a distributed evaluation model, only a file is needed.
- Since:
- 1.0
- Author:
- Grupo Integrado de IngenierĂa (www.gii.udc.es)
Field Summary |
private int |
number
|
Method Summary |
void |
configure(org.apache.commons.configuration.Configuration conf)
Configures the specific element that implements this method. |
java.lang.String |
getLogID()
|
int |
getNumber()
|
void |
setNumber(int number)
|
void |
update(java.util.Observable o,
java.lang.Object arg)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
number
private int number
BestIndividualLogTool
public BestIndividualLogTool()
- Creates a new instance of BestIndividualLogTool
BestIndividualLogTool
public BestIndividualLogTool(int number)
- Creates a new instance of BestIndividualLogTool
- Parameters:
number
- The number of individuals to show.
getLogID
public java.lang.String getLogID()
- Overrides:
getLogID
in class LogTool
update
public void update(java.util.Observable o,
java.lang.Object arg)
- Specified by:
update
in interface java.util.Observer
- Overrides:
update
in class LogTool
configure
public void configure(org.apache.commons.configuration.Configuration conf)
- Description copied from interface:
Configurable
- Configures the specific element that implements this method.
- Specified by:
configure
in interface Configurable
- Overrides:
configure
in class LogTool
- Parameters:
conf
- a Configuration object.- See Also:
Configuration
getNumber
public int getNumber()
setNumber
public void setNumber(int number)