internal void Create_PortalsDistanciesTableForSeparator
     (BTNode <DecompositionTreeItem, LeafDistTable> btNode,
     Dictionary <long, Node> nodes,
     NodesToSeparatorPathsTable mainTable)
 {
     Create_SeparatorDistanciesTable(nodes);
     foreach (Node x in nodes.Values)
     {
         Dictionary <int, Node> portalsX =
             ChoosePortalsForX(x, path0, pathDist0, -1);
         List <int[]> table0 = new List <int[]>();
         foreach (Node p in portalsX.Values)
         {
             table0.Add(new int[]
                        { (int)x.LMdist[p.id], pathDist0[p.id] });
         }
         mainTable.table[x.id].Add(btNode, new Dictionary <int, List <int[]> >());
         mainTable.table[x.id][btNode][0] = table0;
         portalsX = ChoosePortalsForX(x, path1, pathDist1, 1);
         List <int[]> table1 = new List <int[]>();
         foreach (Node p in portalsX.Values)
         {
             table1.Add(new int[]
                        { (int)x.LMdist[p.id], pathDist0[p.id] });
         }
         mainTable.table[x.id][btNode][1] = table1;
     }
 }
 public DecompositionTree
     (DecompositionTree <DecompositionTreeItem, LeafDistTable> sepTree,
     List <Leaf <DecompositionTreeItem, LeafDistTable> > leaves,
     Dictionary <long, Node> graphNodes)
 {
     root = sepTree.root;
     foreach (Leaf <DecompositionTreeItem, LeafDistTable> leaf in leaves)
     {
         leaf.table = new LeafDistTable(graphNodes, leaf.value.nodesSubset);
         foreach (long id in leaf.value.nodesSubset)
         {
             subsets.Add(id, leaf);
         }
     }
     SetDepthAndDecompTreePath(root, 0, new List <bool>());
     nodesToSeparatorPaths = new NodesToSeparatorPathsTable(graphNodes);
     Get_xToSeparatorPaths(root, graphNodes);
 }