Adds a point to be clustered.

@param m
the mass at the point
@param xs
the coordinates of the point
@param key
a key assigned to the point, may be null
962865
public void add(double m, Object pt, K key) {
		if (m == 0.0) return; //nothing to do
		if (count < capacity) { //shortcut
			//TODO should prefer add if var comes to zero
			GvmCluster<S,K> cluster = new GvmCluster<S,K>(this);
			clusters[additions] = cluster;
			cluster.set(m, pt);
			addPairs();
			cluster.key = keyer.addKey(cluster, key);
			count++;
			bound = count;
		} else {
			//identify cheapest merge
			GvmClusterPair<S,K> mergePair = pairs.peek();
			double mergeT = mergePair == null ? Double.MAX_VALUE : mergePair.value;
			//find cheapest addition
			GvmCluster<S,K> additionC = null;
			double additionT = Double.MAX_VALUE;
			for (int i = 0; i < clusters.length; i++) {
				GvmCluster<S,K> cluster = clusters[i];
				double t = cluster.test(m, pt);
				if (t < additionT) {
					additionC = cluster;
					additionT = t;
				}
			}
			if (additionT <= mergeT) {
				//chose addition
				additionC.add(m, pt);
				updatePairs(additionC);
				additionC.key = keyer.addKey(additionC, key);
			} else {
				//choose merge
				GvmCluster<S,K> c1 = mergePair.c1;
				GvmCluster<S,K> c2 = mergePair.c2;
				if (c1.m0 < c2.m0) {
					c1 = c2;
					c2 = mergePair.c1;
				}
				c1.key = keyer.mergeKeys(c1, c2);
				c1.add(c2);
				updatePairs(c1);
				c2.set(m, pt);
				updatePairs(c2);
				//TODO should this pass through a method on keyer?
				c2.key = null;
				c2.key = keyer.addKey(c2, key);
			}
		}
		additions++;
	}
863651
void putKey(CmsFlexCacheKey key) {

        if (!isEnabled()) {
            return;
        }
        Object o = m_keyCache.get(key.getResource());
        if (o == null) {
            // No variation map for this resource yet, so create one
            CmsFlexCacheVariation variationMap = new CmsFlexCacheVariation(key);
            m_keyCache.put(key.getResource(), variationMap);
            if (LOG.isDebugEnabled()) {
                LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_ADD_KEY_1, key.getResource()));
            }
        }
        // If != null the key is already in the cache, so we just do nothing
    }
505706
public final void push(String s)
  {

    if ((m_firstFree + 1) >= m_mapSize)
    {
      m_mapSize += m_blocksize;

      String newMap[] = new String[m_mapSize];

      System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);

      m_map = newMap;
    }

    m_map[m_firstFree] = s;

    m_firstFree++;
  }
726519
public int add(K key)
    {
        int[] f = get(key);
        if (f == null)
        {
            f = new int[]{1};
            put(key, f);
        }
        else ++f[0];

        return f[0];
    }
546082
public GeoCoord put(String key, String x, String y) {
        super.put(key, new BigDecimal[]{new BigDecimal(x), new BigDecimal(y)});
        return this;
    }
989869
public boolean containsKey(Object key) {
	if (key == null) {
	    throw new NullPointerException("key cannot be null");
	}
	else if (key instanceof String) {
	    Node<V> n = lookup((String)key);
	    return n != null && n.isTerminal();
	}
	else {
	    throw new ClassCastException("The provided key does not implement" +
					 " String: " + key);
	}
    }
929488
public void addFalsePositive(Key key) {
    if (key == null) {
      throw new NullPointerException("key can not be null");
    }

    int[] h = hash.hash(key);
    hash.clear();

    for (int i = 0; i < nbHash; i++) {
      fpVector[h[i]].add(key);
    }
  }
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++;
				}
			}
		}
	}
1277044
public static final void remove(String key) {
        Map<String, Object> ctx = CTX_HOLDER.get();
        if (ctx != null) {
            ctx.remove(key);
        }
    }
1001275
public synchronized void
addTrustedKey(DNSKEYRecord key) {
	Name name = key.getName();
	List list = (List) trustedKeys.get(name);
	if (list == null)
		trustedKeys.put(name, list = new LinkedList());
	list.add(key);
}
1147540
public void pressKey(final String key) {
        if (key == null) return;

        runWithRetries(() -> {
            elementImpl.locateElement().sendKeys(key);
        });
    }
1006607
public final void put(String key, int value)
  {

    if ((m_firstFree + 1) >= m_mapSize)
    {
      m_mapSize += m_blocksize;

      String newMap[] = new String[m_mapSize];

      System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);

      m_map = newMap;

      int newValues[] = new int[m_mapSize];

      System.arraycopy(m_values, 0, newValues, 0, m_firstFree + 1);

      m_values = newValues;
    }

    m_map[m_firstFree] = key;
    m_values[m_firstFree] = value;

    m_firstFree++;
  }
1334011
public void add(Metrics m) {
        timeCount += m.timeCount;
        readingTimeCount += m.readingTimeCount;
        nodes += m.nodes;
        backtracks += m.backtracks;
        fails += m.fails;
        restarts += m.restarts;
    }
543237
public void add(double... point) {
    if(this.ok) {
      this.points = new ArrayList<>(this.points);
      this.ok = false;
    }
    this.points.add(point);
    // Update data set extends
    minmaxX.put(point[0]);
    minmaxY.put(point[1]);
  }
621176
public void setKey(int index, byte[] key) throws IOException {
        if (index >= structure.keySizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        int length = structure.keySizes.get(index);
        if (key.length != length) {
            throw new IOException("The length of the given key is not equal to the expected one. (" + key.length
                    + "!=" + length + ")");
        }
        Bytes.putBytes(this.key, structure.keyByteOffsets.get(index), key, 0, key.length);
    }
761828
void set(GvmCluster<S,K> cluster) {
		if (cluster == this) throw new IllegalArgumentException("cannot set cluster to itself");
		
		m0 = cluster.m0;
		clusters.space.setTo(m1, cluster.m1);
		clusters.space.setTo(m2, cluster.m2);
		var = cluster.var;
	}
29369
public void add(double x, double y) {
		resize(m_pointCount + 1);
		Point2D pt = new Point2D();
		pt.setCoords(x, y);
		setXY(m_pointCount - 1, pt);
	}