/** * Returns a <code>LinkedHashMap</code> which maps each node in the graph (including the <code> * source</code> node) to the last edge on the shortest path from the <code>source</code> node. * The map's iterator will return the elements in order of increasing distance from <code> * source</code>. * * @see DijkstraDistance#getDistanceMap(Object,int) * @see DijkstraDistance#getDistance(Object,Object) * @param source the node from which distances are measured */ public Map<N, E> getIncomingEdgeMap(N source) { return getIncomingEdgeMap(source, g.nodes().size()); }
/** * <p>Returns a <code>LinkedHashMap</code> which maps each vertex * in the graph (including the <code>source</code> vertex) * to the last edge on the shortest path from the * <code>source</code> vertex. * The map's iterator will return the elements in order of * increasing distance from <code>source</code>. * * @see DijkstraDistance#getDistanceMap(Object,int) * @see DijkstraDistance#getDistance(Object,Object) * @param source the vertex from which distances are measured */ public Map<V,E> getIncomingEdgeMap(V source) { return getIncomingEdgeMap(source, g.getVertexCount()); }
/** * <p>Returns a <code>LinkedHashMap</code> which maps each vertex * in the graph (including the <code>source</code> vertex) * to the last edge on the shortest path from the * <code>source</code> vertex. * The map's iterator will return the elements in order of * increasing distance from <code>source</code>.</p> * * @see DijkstraDistance#getDistanceMap(Object,int) * @see DijkstraDistance#getDistance(Object,Object) * @param source the vertex from which distances are measured */ public Map<V,E> getIncomingEdgeMap(V source) { return getIncomingEdgeMap(source, g.getVertexCount()); }
/** * <p> * Returns a <code>LinkedHashMap</code> which maps each vertex in the graph * (including the <code>source</code> vertex) to the last edge on the * shortest path from the <code>source</code> vertex. The map's iterator * will return the elements in order of increasing distance from * <code>source</code>. * </p> * * @see DijkstraDistance#getDistanceMap(Object,int) * @see DijkstraDistance#getDistance(Object,Object) * @param source * the vertex from which distances are measured */ @Override public Map<V, E> getIncomingEdgeMap(V source) { return getIncomingEdgeMap(source, g.getVertexCount()); }