Inserts a ClusteringTreeNode into the ClusteringFeature tree.

@param x
the ClusteringTreeNode
352691
protected void bicoCFUpdate(ClusteringTreeNode x) {
		// Starts with the global root node as the current root node
		ClusteringTreeNode r = this.root;
		int i = 1;
		while (true) {
			ClusteringTreeNode y = r.nearestChild(x.getCenter());
			// Checks if the node can not be merged to the current level
			if (r.hasNoChildren()
					|| y == null
					|| Metric.distanceSquared(x.getCenter(), y.getCenter()) > calcRSquared(i)) {
				// Adds the node to the current root node
				x.setThreshold(calcR(i));
				r.addChild(x);
				this.rootCount++;
				break;
			} else {
				// Checks if the node can be merged to the nearest node without
				// exceeding the global threshold
				if (y.getClusteringFeature().calcKMeansCosts(y.getCenter(),
						x.getClusteringFeature()) <= this.T) {
					// Merges the ClusteringFeature of the node to the
					// ClusteringFeature of the nearest node
					y.getClusteringFeature().merge(x.getClusteringFeature());
					break;
				} else {
					// Navigates one level down in the tree
					r = y;
					i++;
				}
			}
		}
	}
1302160
public void addNode(CDKRNode newNode) {
        getGraph().add(newNode);
        getGraphBitSet().set(getGraph().size() - 1);
    }
409097
protected void layout(TreeNode node) {
    if (node != null) {
      TreeNode child = node.child;

      while (child != null) {
        layout(child);
        child = child.next;
      }

      if (node.child != null) {
        attachParent(node, join(node));
      } else {
        layoutLeaf(node);
      }
    }
  }
931582
public void addNode(Node n) {
		try {
			structure.addNode(n);
			for (NodeListener listener : nodeListeners)
				listener.onInsert(n);
		} catch (DuplicatedNodeException e) {
			duplicatedNodesCounter++;
		}
	}
1097119
@Override
	public void addNode(Node n) {
		if (nodeAccess.getCapacity() < getNodeIndex(nodePos) + NODE_SIZE)
			nodeAccess.ensureCapacity(nodeAccess.getCapacity() + INITIAL_NODE_FILE_SIZE);
		nodIdMapping.put(n.getId(), nodePos);
		
		long nodeIndex = getNodeIndex(nodePos);
		
		nodeAccess.setLong( nodeIndex      , n.getId() );
		nodeAccess.setLong( nodeIndex + 8  ,    -1l    );
		nodeAccess.setLong( nodeIndex + 16 ,    -1l    );
		
		nodeAccess.setLong( 0 , ++nodePos );
		
	}
1079673
private void updateSubtreeMap(final ITreeData paramNode, final INodeReadTrx paramRtx) throws TTIOException {
        assert paramNode != null;
        assert paramRtx != null;

        mIsInSubtree.set(paramNode, paramNode, true);
        if (paramNode.hasParent()) {
            paramRtx.moveTo(paramNode.getDataKey());
            while (((ITreeStructData)paramRtx.getNode()).hasParent()) {
                paramRtx.moveTo(paramRtx.getNode().getParentKey());
                mIsInSubtree.set(paramRtx.getNode(), paramNode, true);
            }
        }
    }
135007
public void add(double[] x) {
        if (root == null) {
            root = new Node();
            root.add(new Leaf(x));
            root.update(x);
        } else {
            root.add(x);
        }
    }
455620
public void insertSiblingAfter(Node node) {
    if (node != null) {
      node.setNextSibling(getNextSibling());
      node.setPrevSibling(this);
    }
  }
885387
private final void insert(Object x) {
        buffer[putIndex] = x;

        if (++putIndex >= buffer.length) {
            putIndex = 0;
        }
    }
561169
public void insert(NumberVector nv) {
    final int dim = nv.getDimensionality();
    // No root created yet:
    if(root == null) {
      ClusteringFeature leaf = new ClusteringFeature(dim);
      leaf.addToStatistics(nv);
      root = new TreeNode(dim, capacity);
      root.children[0] = leaf;
      root.addToStatistics(nv);
      ++leaves;
      return;
    }
    TreeNode other = insert(root, nv);
    // Handle root overflow:
    if(other != null) {
      TreeNode newnode = new TreeNode(dim, capacity);
      newnode.addToStatistics(newnode.children[0] = root);
      newnode.addToStatistics(newnode.children[1] = other);
      root = newnode;
    }
  }
375421
private void growCluster(List<ChessboardCorner> corners, int seedIdx, ChessboardCornerGraph graph) {
		// open contains corner list indexes
		open.add(seedIdx);
		while( open.size > 0 ) {
			int cornerIdx = open.pop();
			Vertex v = vertexes.get(cornerIdx);

			// make sure it hasn't already been processed
			if( v.marked)
				continue;
			v.marked = true;

			// Create the node in the output cluster for this corner
			ChessboardCornerGraph.Node gn = graph.growCorner();
			c2n.data[cornerIdx] = gn.index;
			n2c.data[gn.index] = cornerIdx;
			gn.set(corners.get(cornerIdx));

			// Add to the open list all the edges which haven't been processed yet;
			for (int i = 0; i < v.connections.size(); i++) {
				Vertex dst = v.connections.get(i).dst;
				if( dst.marked)
					continue;
				open.add( dst.index );
			}
		}
	}
838463
public void addNode(int n)
  {

    if (!m_mutable)
      throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");

    this.addElement(n);
  }
1161491
void move(AbstractTreeMap.Entry x, AbstractTreeMap.Entry y)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "move",
                       new Object[] { x, y });

        Entry yParent = (Entry) y.getParent();

        // Set x into the position occupied by y.
        x.setParent(yParent);

        if (yParent == null)
            setRoot(x);
        else if (yParent.getRight() == y)
            yParent.setRight(x);
        else
            yParent.setLeft(x);
        x.setLeft(y.getLeft());
        x.setRight(y.getRight());

        // Set the x to be the parent of y's children.
        if (y.getLeft() != null)
            y.getLeft().setParent(x);
        if (y.getRight() != null)
            y.getRight().setParent(x);

        x.setColor(y.getColor());
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "move",
                       new Object[] { x });
    }
845709
public void insertAsNext(BasicDoubleLinkedNode<V> node) {

    BasicDoubleLinkedNode<V> next = getNext();
    if (next != null) {
      next.previous = node;
      node.setNext(next);
    }
    node.previous = this;
    setNext(node);
  }
961095
public void addNode(String name, Set<ResourceType> resourceTypes) {
    List<FaultStatsForType> faultStats = new ArrayList<FaultStatsForType>(
        resourceTypes.size());
    for (ResourceType type : resourceTypes) {
      faultStats.add(new FaultStatsForType(type));
    }
    nodeToFaultStats.put(name, faultStats);
  }
1098878
void addToCluster(SquareNode seed, List<SquareNode> graph) {
		open.clear();
		open.add(seed);
		while( !open.isEmpty() ) {
			SquareNode n = open.remove( open.size() - 1 );

			for (int i = 0; i < n.square.size(); i++) {
				SquareEdge edge = n.edges[i];
				if( edge == null )
					continue;

				SquareNode other;
				if( edge.a == n )
					other = edge.b;
				else if( edge.b == n )
					other = edge.a;
				else
					throw new RuntimeException("BUG!");

				if( other.graph == SquareNode.RESET_GRAPH) {
					other.graph = n.graph;
					graph.add(other);
					open.add(other);
				} else if( other.graph != n.graph ) {
					throw new RuntimeException("BUG! "+other.graph+" "+n.graph);
				}
			}
		}
	}
1271761
public static void expandNodes(@NonNull JTree tree)
	{
		for (int i = 0; i < tree.getRowCount(); i++)
		{
			tree.expandRow(i);
		}
	}