Jedit 4.1

edu.bsu.cs.algorithm
Class Dijkstra2

java.lang.Object
  |
  +--edu.bsu.cs.algorithm.Algorithm
        |
        +--edu.bsu.cs.algorithm.Dijkstra2

public class Dijkstra2
extends Algorithm

Finds the shortest path between two vertices the user clicks on using Dijkstra's Shortest Path algorithm.

Since:
28 Apr 1999
Version:
6 May 1999
Author:
Robert Pranger
, Francisco Lara-Dammer

Constructor Summary
Dijkstra2()
           
Dijkstra2(JavaGraph graph, Vector inputs, Vector animation)
           
 
Method Summary
 void callOwnConstructor(JavaGraph graph, Vector inputs, Vector animation)
          This method is called by Jedit for any algorithm it executes and must be used in any working algorithm.
protected  void dijkstra2(JavaGraph graph, Vector inputs, Vector animation)
           
protected  void executeDijkstra2(JavaGraph graph, int startVertex, int endVertex)
           
static int indexOfParent(int order, int vertex, int[] parent)
           
static double minimo(double weight1, double weight2)
           
protected  void thatDijkstra2()
           
 
Methods inherited from class edu.bsu.cs.algorithm.Algorithm
getCode, getDescription, getName, getType, setCode, setDescription, setFromResources, setName, setType, succeeded, succeeded
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dijkstra2

public Dijkstra2()

Dijkstra2

public Dijkstra2(JavaGraph graph,
                 Vector inputs,
                 Vector animation)
Method Detail

thatDijkstra2

protected void thatDijkstra2()

dijkstra2

protected void dijkstra2(JavaGraph graph,
                         Vector inputs,
                         Vector animation)

executeDijkstra2

protected void executeDijkstra2(JavaGraph graph,
                                int startVertex,
                                int endVertex)

callOwnConstructor

public void callOwnConstructor(JavaGraph graph,
                               Vector inputs,
                               Vector animation)
Description copied from class: Algorithm
This method is called by Jedit for any algorithm it executes and must be used in any working algorithm.

Specified by:
callOwnConstructor in class Algorithm
Parameters:
graph - the edu.bsu.cs.graph.JavaGraph that the algorithm is performed on
inputs - a Vector of inputs that consists of
  • An Integer, if the algorithm uses a single vertex as a starting point
  • Two Integers if the algorithm uses two vertices as starting points
  • A String if the algorithm starts off of typed input
  • Nothing if the algorithm runs automatically on a graph
animation - a Vector that is filled with AnimObjects as the algorithm proceeds. It must be instantiated before this method is called.

minimo

public static double minimo(double weight1,
                            double weight2)

indexOfParent

public static int indexOfParent(int order,
                                int vertex,
                                int[] parent)

Jedit 4.1