function findLCA(node1, node2, layoutInfo) {
  // Find their common ancester, starting from the root graph
  var res = findLCA_aux(node1, node2, 0, layoutInfo);

  if (2 > res.count) {
    // If aux function couldn't find the common ancester,
    // then it is the root graph
    return 0;
  } else {
    return res.graph;
  }
}
function findLCA(node1, node2, layoutInfo) {
  // Find their common ancester, starting from the root graph
  var res = findLCA_aux(node1, node2, 0, layoutInfo);

  if (2 > res.count) {
    // If aux function couldn't find the common ancester,
    // then it is the root graph
    return 0;
  } else {
    return res.graph;
  }
}
function findLCA ( node1 , node2 , layoutInfo ) { // Find their common ancester, starting from the root graph var res = findLCA_aux ( node1 , node2 , 0 , layoutInfo ) ; if ( 2 > res . count ) { // If aux function couldn't find the common ancester, // then it is the root graph return 0 ; } else { return res . graph ; } }
@brief : This function finds the index of the lowest common
graph ancestor between 2 nodes in the subtree
(from the graph hierarchy induced tree) whose
root is graphIx

@arg node1: node1's ID
@arg node2: node2's ID
@arg layoutInfo: layoutInfo object
@brief : This function finds the index of the lowest common graph ancestor between 2 nodes in the subtree ( from the graph hierarchy induced tree ) whose root is graphIx
Find the common ancester of two nodes