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

double org::_3pq::jgrapht::traverse::ClosestFirstIterator::getShortestPathLength ( Object  vertex  )  [inline]

Get the length of the shortest path known to the given vertex. If the vertex has already been visited, then it is truly the shortest path length; otherwise, it is the best known upper bound.

Parameters:
vertex vertex being sought from start vertex
Returns:
length of shortest path known, or Double.POSITIVE_INFINITY if no path found yet

Definition at line 133 of file ClosestFirstIterator.java.

References org::_3pq::jgrapht::traverse::CrossComponentIterator::getSeenData(), and org::_3pq::jgrapht::traverse::ClosestFirstIterator::QueueEntry::getShortestPathLength().

Referenced by org::_3pq::jgrapht::alg::DijkstraShortestPath::DijkstraShortestPath().

                                                         {
        QueueEntry entry = (QueueEntry) getSeenData( vertex );

        if( entry == null ) {
            return Double.POSITIVE_INFINITY;
        }

        return entry.getShortestPathLength(  );
    }


Generated by  Doxygen 1.6.0   Back to index