eaLib API Docs
Last Modified : January 7 2002

mss.ea.stat
Class AverageScoreCollector

java.lang.Object
  |
  +--mss.ea.stat.AbstractUnbufferedCollector
        |
        +--mss.ea.stat.ScoreCollector
              |
              +--mss.ea.stat.AverageScoreCollector
All Implemented Interfaces:
DataCollector, java.util.EventListener, NotificationListener

public class AverageScoreCollector
extends ScoreCollector

Collector which calculates the average score of a population. This implies that the score is a Number. The collect() method performs a cast to Number, if that fails an avarage score of 0.0 is returned. The exception appears in the tracelog.

Since:
0.1
Version:
0.1 (08-21-2001)
Author:
Andreas Rummler

Constructor Summary
AverageScoreCollector(DataTracker dt, AbstractPopulation ap)
          Constructor.
 
Method Summary
 void collect()
          Collects the data.
 
Methods inherited from class mss.ea.stat.AbstractUnbufferedCollector
getData, isBuffered, notificationSignal, setTracker
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AverageScoreCollector

public AverageScoreCollector(DataTracker dt,
                             AbstractPopulation ap)
Constructor.
Parameters:
dt - tracker to send data to
ap - population to retrieve score from
Method Detail

collect

public void collect()
Collects the data.
Overrides:
collect in class ScoreCollector

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS