sdt.ga
Class AsyncPrintThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--sdt.ga.AsyncPrintThread

public class AsyncPrintThread
extends java.lang.Thread

Implementation of the thread which prints the properties of a generation as it completes. The thread blocks till this happens.


Field Summary
 boolean popFinished
          boolean indicating if the fitness evaluations in a generation has completed.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AsyncPrintThread(AsyncPopulation p)
          Creates an instance of a print thread with the specified population.
 
Method Summary
 void inform()
          notifies the thread that fitness evaluations are complete.
 void printPop(AsyncPopulation p)
          Prints the properties of the population.
 void run()
          The print thread blocks when fitness evaluations are not complete, and prints the population properties when the evaluations are finished.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

popFinished

public boolean popFinished
boolean indicating if the fitness evaluations in a generation has completed.
Constructor Detail

AsyncPrintThread

public AsyncPrintThread(AsyncPopulation p)
Creates an instance of a print thread with the specified population.
Method Detail

printPop

public void printPop(AsyncPopulation p)
Prints the properties of the population.

inform

public void inform()
notifies the thread that fitness evaluations are complete.

run

public void run()
The print thread blocks when fitness evaluations are not complete, and prints the population properties when the evaluations are finished.
Overrides:
run in class java.lang.Thread