Algorithm
Class AbstractAlgorithm

java.lang.Object
  extended by Algorithm.AbstractAlgorithm
All Implemented Interfaces:
Algorithm
Direct Known Subclasses:
MyFirstSearchEngine

public abstract class AbstractAlgorithm
extends java.lang.Object
implements Algorithm

An Abstract algorithm class that should be useful for most algorithms. Contains two pipelines: One pipeline for initialization. One pipeline for looping.


Method Summary
 Pipeline getInitPipeline()
           
 Pipeline getLoopPipeline()
           
abstract  void init()
          Initializing the algorithm
abstract  void run(int steps)
          Run for the specified number of steps
 void setInitPipeline(Pipeline init)
           
 void setLoopPipeline(Pipeline loop)
           
abstract  void step()
          Step the algorithm once
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

step

public abstract void step()
Description copied from interface: Algorithm
Step the algorithm once

Specified by:
step in interface Algorithm

init

public abstract void init()
Description copied from interface: Algorithm
Initializing the algorithm

Specified by:
init in interface Algorithm

run

public abstract void run(int steps)
Description copied from interface: Algorithm
Run for the specified number of steps

Specified by:
run in interface Algorithm
Parameters:
steps - run for steps

setLoopPipeline

public void setLoopPipeline(Pipeline loop)

getLoopPipeline

public Pipeline getLoopPipeline()

setInitPipeline

public void setInitPipeline(Pipeline init)

getInitPipeline

public Pipeline getInitPipeline()