CriticalPathLengthCalculator { public N getCriticalPathDistance (V vertStart, V vertEnd) { Map<V, N> map = m_mapDistances.get (vertEnd); if (map == null) { m_mapDistances.put (vertEnd, map = computeCriticalPathDistances (vertEnd)); } N nDistance = map.get (vertStart); if (nDistance == null) return MINUS_INFINITY; return nDistance; } @SuppressWarnings("unchecked")  CriticalPathLengthCalculator(IGraph<V, E> graph, Class<? extends Number> clsNum); N getCriticalPathDistance(V vertStart, V vertEnd);  }
@Test public void testGetCriticalPathDistance () { for (Vertex v : m_graph.getVertices ()) System.out.println (StringUtil.concat (v.toString (), " { ", m_calc.getCriticalPathDistance (v, m_vJ), " }")); }