Updates the kNNs of the RkNNs of the specified ids.

@param ids the ids of deleted objects causing a change of materialized kNNs
@return the RkNNs of the specified ids, i.e. the kNNs which have been
updated
769467
private ArrayDBIDs updateKNNsAfterDeletion(DBIDs ids) {
    SetDBIDs idsSet = DBIDUtil.ensureSet(ids);
    ArrayModifiableDBIDs rkNN_ids = DBIDUtil.newArray();
    for(DBIDIter iditer = relation.iterDBIDs(); iditer.valid(); iditer.advance()) {
      KNNList kNNs = storage.get(iditer);
      for(DBIDIter it = kNNs.iter(); it.valid(); it.advance()) {
        if(idsSet.contains(it)) {
          rkNN_ids.add(iditer);
          break;
        }
      }
    }

    // update the kNNs of the RkNNs
    List<? extends KNNList> kNNList = knnQuery.getKNNForBulkDBIDs(rkNN_ids, k);
    DBIDIter iter = rkNN_ids.iter();
    for(int i = 0; i < rkNN_ids.size(); i++, iter.advance()) {
      storage.put(iter, kNNList.get(i));
    }

    return rkNN_ids;
  }
1287963
public void setIds(java.util.Collection<String> ids) {
        if (ids == null) {
            this.ids = null;
            return;
        }

        this.ids = new com.amazonaws.internal.SdkInternalList<String>(ids);
    }
137396
public static byte[] getIids(final List<String> ids, final UniqueIds uids) {
        final int size = ids.size();
        final byte[] iids = new byte[IID_WIDTH * size];
        for (int i = 0; i < size; i++) {
            final String instanceId = ids.get(i);
            final byte[] iid = uids.getUiid().getId(instanceId);
            System.arraycopy(iid, 0, iids, i * IID_WIDTH, IID_WIDTH);
        }
        return iids;
    }
342591
@Override
    public IdsBuilder append(final int... ids) {
        return doAppend(Arrays.asList(InternalUtils.wrap(ids)));
    }
119494
@Override
    public List<T> getAll(final String... ids) {
        if (ids == null || ids.length == 0) {
            return Collections.<T> emptyList();
        }

        // delegate to internal method that partitions the list into smaller groups and aggregates
        // the result
        return getAll(Lists.newArrayList(ids));
    }
1015495
public UpdatePullRequestParams attachmentIds(List<Long> attachmentIds) {
        for (Long attachmentId : attachmentIds) {
            parameters.add(new NameValuePair("attachmentId[]", attachmentId.toString()));
        }
        return this;
    }
1075222
public void setUpdateIds(java.util.Collection<String> updateIds) {
        if (updateIds == null) {
            this.updateIds = null;
            return;
        }

        this.updateIds = new java.util.ArrayList<String>(updateIds);
    }
782420
protected void objectsInserted(DBIDs ids) {
    final Logging log = getLogger(); // Could be subclass
    StepProgress stepprog = log.isVerbose() ? new StepProgress(3) : null;

    ArrayDBIDs aids = DBIDUtil.ensureArray(ids);
    // materialize the new kNNs
    log.beginStep(stepprog, 1, "New insertions ocurred, materialize their new kNNs.");
    // Bulk-query kNNs
    List<? extends KNNList> kNNList = knnQuery.getKNNForBulkDBIDs(aids, k);
    // Store in storage
    DBIDIter iter = aids.iter();
    for(int i = 0; i < aids.size(); i++, iter.advance()) {
      storage.put(iter, kNNList.get(i));
    }

    // update the affected kNNs
    log.beginStep(stepprog, 2, "New insertions ocurred, update the affected kNNs.");
    ArrayDBIDs rkNN_ids = updateKNNsAfterInsertion(ids);

    // inform listener
    log.beginStep(stepprog, 3, "New insertions ocurred, inform listeners.");
    fireKNNsInserted(ids, rkNN_ids);

    log.setCompleted(stepprog);
  }
1038168
public String[] lookupString(int[] ids) {
		String[] vals = new String[ids.length];
		for(int i = 0; i < ids.length; i++)	{
			vals[i] = index.get(ids[i]);
		}
		return vals;
	}
590230
protected Object[] idsOf(final List<?> idsOrValues) {
        // convert list to array that we can mutate
        final Object[] ids = idsOrValues.toArray();

        // mutate array to contain only non-empty ids
        int length = 0;
        for (int i = 0; i < ids.length;) {
            final Object p = ids[i++];
            if (p instanceof HasId) {
                // only use values with ids that are non-empty
                final String id = ((HasId) p).getId();
                if (!StringUtils.isEmpty(id)) {
                    ids[length++] = id;
                }
            } else if (p instanceof String) {
                // only use ids that are non-empty
                final String id = p.toString();
                if (!StringUtils.isEmpty(id)) {
                    ids[length++] = id;
                }
            } else if (p != null) {
                throw new StoreException("Invalid id or value of type " + p);
            }
        }

        // no ids in array
        if (length == 0) {
            return null;
        }

        // some ids in array
        if (length != ids.length) {
            final Object[] tmp = new Object[length];
            System.arraycopy(ids, 0, tmp, 0, length);
            return tmp;
        }

        // array was full
        return ids;
    }
1184256
public void setInternetGatewayIds(java.util.Collection<String> internetGatewayIds) {
        if (internetGatewayIds == null) {
            this.internetGatewayIds = null;
            return;
        }

        this.internetGatewayIds = new com.amazonaws.internal.SdkInternalList<String>(internetGatewayIds);
    }
325629
private int updateSizes(DBIDs ids, WritableDataStore<ModifiableDBIDs> labels, WritableIntegerDataStore newSizes) {
    // to count the unclustered all over
    int countUnmerged = 0;
    for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
      // checking the point's new cluster size after the clustering step
      int newClusterSize = labels.get(iter).size();
      newSizes.putInt(iter, newClusterSize);
      // the point is alone in the cluster --> not merged with other points
      if(newClusterSize == 1) {
        countUnmerged++;
      }
    }
    return countUnmerged;
  }
840630
protected void fireKNNsRemoved(DBIDs removals, DBIDs updates) {
    KNNChangeEvent e = new KNNChangeEvent(this, KNNChangeEvent.Type.DELETE, removals, updates);
    Object[] listeners = listenerList.getListenerList();
    for(int i = listeners.length - 2; i >= 0; i -= 2) {
      if(listeners[i] == KNNListener.class) {
        ((KNNListener) listeners[i + 1]).kNNsChanged(e);
      }
    }
  }
1240985
@Override
    public List<T> findAllById(Iterable<ID> ids) {
        Assert.notNull(ids, "Iterable ids should not be null");

        return operation.findByIds(ids, information.getJavaType(), information.getCollectionName());
    }
234355
public void setRemoveSubnetIds(java.util.Collection<String> removeSubnetIds) {
        if (removeSubnetIds == null) {
            this.removeSubnetIds = null;
            return;
        }

        this.removeSubnetIds = new com.amazonaws.internal.SdkInternalList<String>(removeSubnetIds);
    }
899131
public UpdateRouteResponseResult withResponseModels(java.util.Map<String, String> responseModels) {
        setResponseModels(responseModels);
        return this;
    }
1061893
public static Integer[] transformToInt(final String[] ids) {
    if (ids == null) return new Integer[0];
    Integer[] idsOfInteger = new Integer[ids.length];
    for (int i = 0; i < ids.length; i++) {
      idsOfInteger[i] = new Integer(ids[i]);
    }
    return idsOfInteger;
  }