예제 #1
0
 public void _insertnode(HeapNode node)
 {
     if (minnode == null)
     {
         minnode = node;
     }
     else
     {
         minnode.insert(node);
         if (node.key < minnode.key)
         {
             minnode = node;
         }
     }
 }
예제 #2
0
 public void addchild(HeapNode node)
 {
     if (child == null)
     {
         child = node;
     }
     else
     {
         child.insert(node);
     }
     node.parent = this;
     node.mark   = false;
     degree++;
 }