inpro.pitch.util
Class ShortestPath<NodeType>

java.lang.Object
  extended by inpro.pitch.util.ShortestPath<NodeType>
Direct Known Subclasses:
PitchOptimizer

public class ShortestPath<NodeType>
extends java.lang.Object


Nested Class Summary
private  class ShortestPath.Connection
           
private  class ShortestPath.Node
           
private  class ShortestPath.PriorityQueue<T>
           
 
Field Summary
private  java.util.HashMap<ShortestPath.Node,java.util.ArrayList<ShortestPath.Connection>> connections
           
private  java.util.HashMap<NodeType,ShortestPath.Node> nodes
           
private  ShortestPath.PriorityQueue<ShortestPath.Node> queue
           
private  ShortestPath.Node startNode
           
private  ShortestPath.Node targetNode
           
 
Constructor Summary
ShortestPath()
           
 
Method Summary
 void addNode(NodeType node)
           
 java.util.List<NodeType> calculate()
           
 void clear()
           
 void connect(NodeType from, NodeType to, double cost)
           
static void main(java.lang.String[] args)
           
 void setStart(NodeType start)
           
 void setTarget(NodeType target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodes

private java.util.HashMap<NodeType,ShortestPath.Node> nodes

connections

private java.util.HashMap<ShortestPath.Node,java.util.ArrayList<ShortestPath.Connection>> connections

startNode

private ShortestPath.Node startNode

targetNode

private ShortestPath.Node targetNode

queue

private ShortestPath.PriorityQueue<ShortestPath.Node> queue
Constructor Detail

ShortestPath

public ShortestPath()
Method Detail

clear

public void clear()

calculate

public java.util.List<NodeType> calculate()

addNode

public void addNode(NodeType node)

setStart

public void setStart(NodeType start)

setTarget

public void setTarget(NodeType target)

connect

public void connect(NodeType from,
                    NodeType to,
                    double cost)

main

public static void main(java.lang.String[] args)