net.sf.jsort.graph
Class Path
java.lang.Object
net.sf.jsort.graph.Path
public class Path
- extends java.lang.Object
This class represents a path in a graph.
It is defined using recursion, such that each instance is based on a path from the source to the "last" vertex.
It keeps the total cost of the path, to make things faster.
- Author:
- Domingos Creado
Constructor Summary |
Path(Path source,
edu.uci.ics.jung.graph.Vertex target,
edu.uci.ics.jung.graph.Edge toTarget,
java.lang.Number totalCost)
|
Path(edu.uci.ics.jung.graph.Vertex source,
java.lang.Number initialCost)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Path
public Path(Path source,
edu.uci.ics.jung.graph.Vertex target,
edu.uci.ics.jung.graph.Edge toTarget,
java.lang.Number totalCost)
Path
public Path(edu.uci.ics.jung.graph.Vertex source,
java.lang.Number initialCost)
getTarget
public edu.uci.ics.jung.graph.Vertex getTarget()
getSource
public edu.uci.ics.jung.graph.Vertex getSource()
getEdges
public java.util.List getEdges()
getTotalCost
public java.lang.Number getTotalCost()
Copyright © 2005-2008 Domingos Creado. All Rights Reserved.