EDU.auburn.VGJ.examplealg
Class ExampleAlg2

java.lang.Object
  extended byEDU.auburn.VGJ.examplealg.ExampleAlg2
All Implemented Interfaces:
GraphAlgorithm

public class ExampleAlg2
extends java.lang.Object
implements GraphAlgorithm

This example randomly moves the nodes. It does this 100 times, and updates the display and waits 5 milliseconds in between.

Here is the source.

Author:
Larry Barowski

Constructor Summary
ExampleAlg2()
           
 
Method Summary
 java.lang.String compute(Graph graph, GraphUpdate update)
          Apply the algorithm to graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExampleAlg2

public ExampleAlg2()
Method Detail

compute

public java.lang.String compute(Graph graph,
                                GraphUpdate update)
Description copied from interface: GraphAlgorithm
Apply the algorithm to graph. The return value should be null if successful, and an error message if unsuccessful.

Specified by:
compute in interface GraphAlgorithm
Parameters:
update - an object that allows the display to be updated from within the algorithm
See Also:
GraphUpdate