u
The result is stocked in cache_all_predecessors
and cache_all_predecessors
# Compute all succesors and all predecessors for the given `u`
# The result is stocked in `cache_all_predecessors` and `cache_all_predecessors`
private fun compute_all_link(u: V)
do
if not vertices.has(u) then return
if not cache_all_predecessors.has_key(u) then cache_all_predecessors[u] = new Set[V]
if not cache_all_successors.has_key(u) then cache_all_successors[u] = new Set[V]
for v in vertices do
if distance(v, u) != null then cache_all_predecessors[u].add(v)
if distance(u, v) != null then cache_all_successors[u].add(v)
end
end
lib/graph/digraph.nit:926,2--937,4