Logo Search packages:      
Sourcecode: libjgrapht-java version File versions  Download package

org::_3pq::jgrapht::traverse::ClosestFirstIterator Class Reference

Inheritance diagram for org::_3pq::jgrapht::traverse::ClosestFirstIterator:

org::_3pq::jgrapht::traverse::CrossComponentIterator org::_3pq::jgrapht::traverse::AbstractGraphIterator org::_3pq::jgrapht::traverse::GraphIterator

List of all members.

Detailed Description

A closest-first iterator for a directed or undirected graph. For this iterator to work correctly the graph must not be modified during iteration. Currently there are no means to ensure that, nor to fail-fast. The results of such modifications are undefined.

The metric for closest here is the path length from a start vertex. Edge.getWeight() is summed to calculate path length. Negative edge weights will result in an IllegalArgumentException. Optionally, path length may be bounded by a finite radius.

John V. Sichi
Sep 2, 2003

Definition at line 64 of file ClosestFirstIterator.java.

Public Member Functions

void addTraversalListener (TraversalListener l)
 ClosestFirstIterator (Graph g, Object startVertex, double radius)
 ClosestFirstIterator (Graph g, Object startVertex)
 ClosestFirstIterator (Graph g)
double getShortestPathLength (Object vertex)
Edge getSpanningTreeEdge (Object vertex)
boolean hasNext ()
boolean isCrossComponentTraversal ()
boolean isReuseEvents ()
Object next ()
void remove ()
void removeTraversalListener (TraversalListener l)
void setCrossComponentTraversal (boolean crossComponentTraversal)
void setReuseEvents (boolean reuseEvents)

Protected Member Functions

void encounterVertex (Object vertex, Edge edge)
void encounterVertexAgain (Object vertex, Edge edge)
void fireConnectedComponentFinished (ConnectedComponentTraversalEvent e)
void fireConnectedComponentStarted (ConnectedComponentTraversalEvent e)
void fireEdgeTraversed (EdgeTraversalEvent e)
void fireVertexTraversed (VertexTraversalEvent e)
Object getSeenData (Object vertex)
boolean isConnectedComponentExhausted ()
boolean isSeenVertex (Object vertex)
Object provideNextVertex ()
Object putSeenData (Object vertex, Object data)

Static Package Functions

static Specifics createGraphSpecifics (Graph g)

Private Member Functions

void assertNonNegativeEdge (Edge edge)
double calculatePathLength (Object vertex, Edge edge)
void checkRadiusTraversal (boolean crossComponentTraversal)
QueueEntry createSeenData (Object vertex, Edge edge)

Private Attributes

FibonacciHeap m_heap = new FibonacciHeap( )
double m_radius = Double.POSITIVE_INFINITY


class  QueueEntry

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index