edu.columbia.cs.utils
Class DependencyGraph

java.lang.Object
  extended by edu.columbia.cs.utils.SimpleGraph<TokenInformation,java.lang.String>
      extended by edu.columbia.cs.utils.DependencyGraph
All Implemented Interfaces:
java.io.Serializable

public class DependencyGraph
extends SimpleGraph<TokenInformation,java.lang.String>

See Also:
Serialized Form

Constructor Summary
DependencyGraph(int numNodes, double w)
           
 
Method Summary
 void addEdge(int origin, int destiny, java.lang.String label)
           
 void addNode(int pos, TokenInformation label)
           
 double[] getFinalProbVector()
           
 double[] getInitialProbVector()
           
 DependencyGraph getNotShortestPathDependencyGraph()
           
 DependencyGraph getShortestPathDependencyGraph()
           
 java.util.List<Pair<Pair<java.lang.Integer,java.lang.Integer>,java.lang.String>> getShortestPathEdges()
           
 double getTransitionProb(int origin, int dest)
           
 boolean isInShortestPath(int origin, int dest)
           
 void normalizePaths()
           
 java.lang.String toString()
           
 
Methods inherited from class edu.columbia.cs.utils.SimpleGraph
containsEdge, equals, getEdgeLabel, getEdges, getNodeLabel, getNodes, getNumEdges, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DependencyGraph

public DependencyGraph(int numNodes,
                       double w)
Method Detail

addNode

public void addNode(int pos,
                    TokenInformation label)
Overrides:
addNode in class SimpleGraph<TokenInformation,java.lang.String>

addEdge

public void addEdge(int origin,
                    int destiny,
                    java.lang.String label)
Overrides:
addEdge in class SimpleGraph<TokenInformation,java.lang.String>

toString

public java.lang.String toString()
Overrides:
toString in class SimpleGraph<TokenInformation,java.lang.String>

getInitialProbVector

public double[] getInitialProbVector()

getFinalProbVector

public double[] getFinalProbVector()

getTransitionProb

public double getTransitionProb(int origin,
                                int dest)

isInShortestPath

public boolean isInShortestPath(int origin,
                                int dest)

normalizePaths

public void normalizePaths()

getShortestPathEdges

public java.util.List<Pair<Pair<java.lang.Integer,java.lang.Integer>,java.lang.String>> getShortestPathEdges()

getShortestPathDependencyGraph

public DependencyGraph getShortestPathDependencyGraph()

getNotShortestPathDependencyGraph

public DependencyGraph getNotShortestPathDependencyGraph()