net.walend.digraph.path
Interface Path

All Superinterfaces:
Digraph, HasState
All Known Subinterfaces:
CEPath, GEPath, MeasuredCEPath, MeasuredGEPath, MutableCEPath, MutableGEPath, MutableUEPath, UEPath
All Known Implementing Classes:
AbstractDelegateDigraphOfCEPaths.DigraphCEPath, AbstractDelegateDigraphOfGEPaths.DigraphGEPath, AbstractListCEPath, AbstractListGEPath, AbstractListUEPath, AbstractShortestCEPaths.DigraphMeasuredCEPath, AbstractShortestGEPaths.DigraphMeasuredGEPath, CEPathsFromShortestDistances.DigraphMeasuredCEPath, MutableListCEPath, MutableListGEPath, MutableListUEPath

public interface Path
extends Digraph

Path is an interface for representing paths through Digraphs. A Path is expressly a subgraph of a specific Digraph.

Author:
David Walend dfw1@cornell.edu

Method Summary
 java.lang.Object getHead()
           
 int getIndexOfNode(java.lang.Object node)
           
 int getLastIndexOfNode(java.lang.Object node)
           
 java.lang.Object getNodeAtIndex(int index)
           
 java.util.List getNodeList()
          Returns an immutable list of the nodes.
 java.lang.Object getTail()
           
 int pathEdgeCount()
          Returns the number of edges in the path, including repeates.
 EdgeNodeIterator pathEdgeNodeIterator()
          Iterate through the edges in path order.
 int pathNodeCount()
          Returns the number of nodes in the path, including repeates.
 java.util.Iterator pathNodeIterator()
          Implementations should explicitly state how they interpret nodeIterator()'s remove method.
 boolean valid()
          Returns true if this path is still a subgraph of its supergraph
 
Methods inherited from interface net.walend.digraph.Digraph
containsEdge, containsNode, containsNodes, countInboundEdges, countOutboundEdges, edgeCount, edgeNodeIterator, getFromNodes, getNodes, getToNodes, isEdgeFree, isEmpty, nodeCount, nodeIterator
 
Methods inherited from interface net.walend.collection.HasState
getPrincipleInterface, sameStateAs
 

Method Detail

valid

public boolean valid()
Returns true if this path is still a subgraph of its supergraph


pathNodeCount

public int pathNodeCount()
Returns the number of nodes in the path, including repeates.


pathEdgeCount

public int pathEdgeCount()
Returns the number of edges in the path, including repeates.


getHead

public java.lang.Object getHead()

getTail

public java.lang.Object getTail()

getNodeAtIndex

public java.lang.Object getNodeAtIndex(int index)

getIndexOfNode

public int getIndexOfNode(java.lang.Object node)

getLastIndexOfNode

public int getLastIndexOfNode(java.lang.Object node)

getNodeList

public java.util.List getNodeList()
Returns an immutable list of the nodes.


pathNodeIterator

public java.util.Iterator pathNodeIterator()
Implementations should explicitly state how they interpret nodeIterator()'s remove method. It should either throw an UnsupportedOperationException or cause a hidden side effect of removing edges.

The Iterator should start at the beginning of the path and iterate to the end.


pathEdgeNodeIterator

public EdgeNodeIterator pathEdgeNodeIterator()
Iterate through the edges in path order.

If Path is immutable, edgeIterator()'s remove() method throws an UnsupportedOperationException.



Copyright (c) 2001, 2002, David Walend