joint.all.js
function computeLowLim(tree) {
  var postOrderNum = 0;
  
  function dfs(n) {
    var children = tree.successors(n);
    var low = postOrderNum;
    for (var c in children) {
      var child = children[c];
      dfs(child);
      low = Math.min(low, tree.node(child).low);
    }
    tree.node(n).low = low;
    tree.node(n).lim = postOrderNum++;
  }

  dfs(tree.graph().root);
}
function computeLowLim(tree) {
  var postOrderNum = 0;
  
  function dfs(n) {
    var children = tree.successors(n);
    var low = postOrderNum;
    for (var c in children) {
      var child = children[c];
      dfs(child);
      low = Math.min(low, tree.node(child).low);
    }
    tree.node(n).low = low;
    tree.node(n).lim = postOrderNum++;
  }

  dfs(tree.graph().root);
}
function computeLowLim ( tree ) { var postOrderNum = 0 ; function dfs ( n ) { var children = tree . successors ( n ) ; var low = postOrderNum ; for ( var c in children ) { var child = children [ c ] ; dfs ( child ) ; low = Math . min ( low , tree . node ( child ) . low ) ; } tree . node ( n ) . low = low ; tree . node ( n ) . lim = postOrderNum ++ ; } dfs ( tree . graph ( ) . root ) ; }
/*
Perform a DFS postorder traversal, labeling each node v with
its traversal order 'lim(v)' and the minimum traversal number
of any of its descendants 'low(v)'.  This provides an efficient
way to test whether u is an ancestor of v since
low(u) <= lim(v) <= lim(u) if and only if u is an ancestor.
/ * Perform a DFS postorder traversal labeling each node v with its traversal order lim ( v ) and the minimum traversal number of any of its descendants low ( v ) . This provides an efficient way to test whether u is an ancestor of v since low ( u ) < = lim ( v ) < = lim ( u ) if and only if u is an ancestor .