eaLib API Docs
Last Modified : January 7 2002

mss.ea.stat
Class StatTracker

java.lang.Object
  |
  +--mss.ea.stat.StatTracker
Direct Known Subclasses:
FitnessTracker, ScoreTracker

public abstract class StatTracker
extends java.lang.Object

Abstract base class for tracking various data.

Since:
0.1
Version:
0.1 (01-04-2001)
Author:
Andreas Rummler

Field Summary
protected  java.lang.String header
           
protected  boolean headerFlag
           
protected  AbstractPopulation pop
          Population to gather information from.
protected  java.lang.String separator
           
protected  java.lang.String[] singleBuffer
           
protected  java.util.Vector trackBuffer
           
protected  java.io.PrintWriter writer
           
 
Constructor Summary
StatTracker(AbstractPopulation pop)
          Constructor.
StatTracker(AbstractPopulation pop, java.io.OutputStream stream)
          Constructor with output file to send stream to.
StatTracker(AbstractPopulation pop, java.io.PrintWriter writer)
          Constructor with output stream.
 
Method Summary
 void clearBuffer()
           
 void flushBuffer()
           
abstract  void gather()
           
 AbstractPopulation getPopulation()
          Gets the population this tracker belongs to.
 void setHeader(java.lang.String header)
           
 void setPopulation(AbstractPopulation pop)
          Sets a new population to gather information from.
 void setSeparator(java.lang.String separator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pop

protected AbstractPopulation pop
Population to gather information from.

writer

protected java.io.PrintWriter writer

header

protected java.lang.String header

headerFlag

protected boolean headerFlag

separator

protected java.lang.String separator

singleBuffer

protected java.lang.String[] singleBuffer

trackBuffer

protected java.util.Vector trackBuffer
Constructor Detail

StatTracker

public StatTracker(AbstractPopulation pop)
Constructor. This will set the output stream to System.out.
Parameters:
pop - population to gather information from

StatTracker

public StatTracker(AbstractPopulation pop,
                   java.io.PrintWriter writer)
Constructor with output stream.
Parameters:
pop - population to gather information from
stream - output stream

StatTracker

public StatTracker(AbstractPopulation pop,
                   java.io.OutputStream stream)
Constructor with output file to send stream to.
Parameters:
pop - population to gather information from
filename - output file
Method Detail

getPopulation

public AbstractPopulation getPopulation()
Gets the population this tracker belongs to.
Returns:
population this tracker belongs to

setPopulation

public void setPopulation(AbstractPopulation pop)
Sets a new population to gather information from.
Parameters:
pop - new population

gather

public abstract void gather()

setHeader

public void setHeader(java.lang.String header)

setSeparator

public void setSeparator(java.lang.String separator)

clearBuffer

public void clearBuffer()

flushBuffer

public void flushBuffer()

eaLib API Docs
Last Modified : January 7 2002

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