dgraph.js
function visit(node) {
    if(node.flag) {
      var v = node.value.value
      var adj = v.adjacent
      for(var ptr=elist.level(adj, level); ptr<adj.length && adj[ptr].level === level; ++ptr) {
        var e = adj[ptr]
        var es = e.s
        var et = e.t
        if(es.euler[level].path(et.euler[level])) {
          raiseLevel(e)
          ptr -= 1
        } else {
          //Found the edge, relink components
          link(e)
          return true
        }
      }
    }
    if(node.left && node.left.flagAggregate) {
      if(visit(node.left)) {
        return true
      }
    }
    if(node.right && node.right.flagAggregate) {
      if(visit(node.right)) {
        return true
      }
    }
    return false
  }
function visit(node) {
    if(node.flag) {
      var v = node.value.value
      var adj = v.adjacent
      for(var ptr=elist.level(adj, level); ptr<adj.length && adj[ptr].level === level; ++ptr) {
        var e = adj[ptr]
        var es = e.s
        var et = e.t
        if(es.euler[level].path(et.euler[level])) {
          raiseLevel(e)
          ptr -= 1
        } else {
          //Found the edge, relink components
          link(e)
          return true
        }
      }
    }
    if(node.left && node.left.flagAggregate) {
      if(visit(node.left)) {
        return true
      }
    }
    if(node.right && node.right.flagAggregate) {
      if(visit(node.right)) {
        return true
      }
    }
    return false
  }
function visit ( node ) { if ( node . flag ) { var v = node . value . value var adj = v . adjacent for ( var ptr = elist . level ( adj , level ) ; ptr < adj . length && adj [ ptr ] . level === level ; ++ ptr ) { var e = adj [ ptr ] var es = e . s var et = e . t if ( es . euler [ level ] . path ( et . euler [ level ] ) ) { raiseLevel ( e ) ptr -= 1 } else { //Found the edge, relink components link ( e ) return true } } } if ( node . left && node . left . flagAggregate ) { if ( visit ( node . left ) ) { return true } } if ( node . right && node . right . flagAggregate ) { if ( visit ( node . right ) ) { return true } } return false }
Search over tv for edge connecting to tw
Search over tv for edge connecting to tw