Package org.jgrapht.alg
Class AbstractPathElement<V,E>
- java.lang.Object
-
- org.jgrapht.alg.AbstractPathElement<V,E>
-
- Direct Known Subclasses:
BellmanFordPathElement
,RankingPathElement
@Deprecated abstract class AbstractPathElement<V,E> extends java.lang.Object
Deprecated.moved in shortest path packageA new path is created from a path concatenated to an edge. It's like a linked list.
The empty path is composed only of one vertex.
In this case the path has no previous path element.
.NOTE jvs 1-Jan-2008: This is an internal data structure for use in algorithms. For returning paths to callers, use the public
GraphPath
interface instead.- Since:
- July 5, 2007
-
-
Field Summary
Fields Modifier and Type Field Description protected int
nHops
Deprecated.Number of hops of the path.protected E
prevEdge
Deprecated.Edge reaching the target vertex of the path.protected AbstractPathElement<V,E>
prevPathElement
Deprecated.Previous path element.private V
vertex
Deprecated.Target vertex.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPathElement(AbstractPathElement<V,E> original)
Deprecated.Copy constructor.protected
AbstractPathElement(Graph<V,E> graph, AbstractPathElement<V,E> pathElement, E edge)
Deprecated.Creates a path element by concatenation of an edge to a path element.protected
AbstractPathElement(V vertex)
Deprecated.Creates an empty path element.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.List<E>
createEdgeListPath()
Deprecated.Returns the path as a list of edges.int
getHopCount()
Deprecated.Returns the number of hops (or number of edges) of the path.E
getPrevEdge()
Deprecated.Returns the edge reaching the target vertex of the path.AbstractPathElement<V,E>
getPrevPathElement()
Deprecated.Returns the previous path element.V
getVertex()
Deprecated.Returns the target vertex of the path.
-
-
-
Field Detail
-
nHops
protected int nHops
Deprecated.Number of hops of the path.
-
prevEdge
protected E prevEdge
Deprecated.Edge reaching the target vertex of the path.
-
prevPathElement
protected AbstractPathElement<V,E> prevPathElement
Deprecated.Previous path element.
-
vertex
private V vertex
Deprecated.Target vertex.
-
-
Constructor Detail
-
AbstractPathElement
protected AbstractPathElement(Graph<V,E> graph, AbstractPathElement<V,E> pathElement, E edge)
Deprecated.Creates a path element by concatenation of an edge to a path element.- Parameters:
pathElement
-edge
- edge reaching the end vertex of the path element created.
-
AbstractPathElement
protected AbstractPathElement(AbstractPathElement<V,E> original)
Deprecated.Copy constructor.- Parameters:
original
- source to copy from
-
AbstractPathElement
protected AbstractPathElement(V vertex)
Deprecated.Creates an empty path element.- Parameters:
vertex
- end vertex of the path element.
-
-
Method Detail
-
createEdgeListPath
public java.util.List<E> createEdgeListPath()
Deprecated.Returns the path as a list of edges.- Returns:
- list of
Edge
.
-
getHopCount
public int getHopCount()
Deprecated.Returns the number of hops (or number of edges) of the path.- Returns:
- .
-
getPrevEdge
public E getPrevEdge()
Deprecated.Returns the edge reaching the target vertex of the path.- Returns:
null
if the path is empty.
-
getPrevPathElement
public AbstractPathElement<V,E> getPrevPathElement()
Deprecated.Returns the previous path element.- Returns:
null
is the path is empty.
-
getVertex
public V getVertex()
Deprecated.Returns the target vertex of the path.- Returns:
- .
-
-