Interface AnimatedAlgorithm

All Superinterfaces:
Algorithm
All Known Implementing Classes:
AbstractAnimatedAlgorithm

public interface AnimatedAlgorithm
extends Algorithm
An AnimatedAlgorithm provides the possibility to execute the underlying algorithm in steps, so that the intermediate results can be seen. It still provides a way to execute the whole algorithm as one big step, as if it was a 'normal' Algorithm.
Version:
$Revision: 1.4 $
See Also:
Algorithm
  • Method Details

    • isFinished

      boolean isFinished()
      Returns true if the algorithm has another step (that means that nextStep() will not throw an Exception).
      Returns:
      true if the algorithm has another step, false otherwise.
    • animate

      void animate​(Graph g)
      Starts the animation of the algorithm. Further execution steps are made through the nextStep() method.
      Parameters:
      g - the Graph to execute the algorithm on.
    • execute

      void execute​(Graph g)
      Executes the whole algorithm as one big step.
      Parameters:
      g - the Graph to execute the algorithm on.
    • nextStep

      void nextStep() throws NoNextStepException
      Executes the next step of the algorithm.
      Throws:
      NoNextStepException - if the algorithm is already finished.