Adjusts the knn distance in the subtree of the specified root entry.

@param entry the root entry of the current subtree
@param knnLists a map of knn lists for each leaf entry
976955
private void adjustApproximatedKNNDistances(MkCoPEntry entry, Map<DBID, KNNList> knnLists) {
    MkCoPTreeNode<O> node = getNode(entry);

    if(node.isLeaf()) {
      for(int i = 0; i < node.getNumEntries(); i++) {
        MkCoPLeafEntry leafEntry = (MkCoPLeafEntry) node.getEntry(i);
        approximateKnnDistances(leafEntry, knnLists.get(leafEntry.getRoutingObjectID()));
      }
    }
    else {
      for(int i = 0; i < node.getNumEntries(); i++) {
        MkCoPEntry dirEntry = node.getEntry(i);
        adjustApproximatedKNNDistances(dirEntry, knnLists);
      }
    }

    ApproximationLine approx = node.conservativeKnnDistanceApproximation(settings.kmax);
    entry.setConservativeKnnDistanceApproximation(approx);
  }
1027500
protected void updateSubNav(List<NavEntry> subEntries) {

        m_rootLayout.clearSubNav();
        if ((subEntries == null) || subEntries.isEmpty()) {
            m_rootLayout.setSubNavVisible(false);
        } else {
            m_rootLayout.setSubNavVisible(true);
            for (NavEntry entry : subEntries) {
                addSubNavEntry(entry);
            }
        }
    }
193385
private void checkBestDistance(KdTree.Node node, FastQueue<KdTreeResult> neighbors) {
		double distSq = distance.distance((P)node.point,target);
		// <= because multiple nodes could be at the bestDistanceSq
		if( distSq <= mostDistantNeighborSq) {
			if( neighbors.size() < searchN ) {
				// the list of nearest neighbors isn't full yet so it doesn't know what the distance will be
				// so just keep on adding them to the list until it is full
				KdTreeResult r = neighbors.grow();
				r.distance = distSq;
				r.node = node;
				if( neighbors.size() == searchN ) {
					// find the most distant
					mostDistantNeighborSq = -1;
					for( int i = 0; i < searchN; i++ ) {
						r = neighbors.get(i);
						if( r.distance > mostDistantNeighborSq ) {
							mostDistantNeighborSq = r.distance;
							mostDistantNeighborIndex = i;
						}
					}
				}
			} else {
				for( int i = 0; i < searchN; i++ ) {
					KdTreeResult r = neighbors.get(i);
					if( r.distance > mostDistantNeighborSq ) {
						throw new RuntimeException("Most distant isn't the most distant");
					}
				}

				// Write over the most distant neighbor since we known this node must be closer
				// and update the maximum distance
				KdTreeResult r = neighbors.get(mostDistantNeighborIndex);
				r.node = node;
				r.distance = distSq;

				// If there are multiple points then there can be more than one point with the value of
				// 'bestDistanceSq', which is why two searches are required
				mostDistantNeighborSq = -1;
				for( int i = 0; i < searchN; i++ ) {
					r = neighbors.get(i);
					if( r.distance > mostDistantNeighborSq ) {
						mostDistantNeighborSq = r.distance;
						mostDistantNeighborIndex = i;
					}
				}
			}
		}
	}
200426
public final void addEntries(Iterator<Entry<?>> entries) {
        if (entries != null) {
            while (entries.hasNext()) {
                addEntry(entries.next());
            }
        }
    }
710547
@Override
  protected void preInsert(MkMaxEntry entry) {
    KNNHeap knns_o = DBIDUtil.newHeap(getKmax());
    preInsert(entry, getRootEntry(), knns_o);
  }
1165541
public void setCrawlers(java.util.Collection<Crawler> crawlers) {
        if (crawlers == null) {
            this.crawlers = null;
            return;
        }

        this.crawlers = new java.util.ArrayList<Crawler>(crawlers);
    }
483359
private TreeEntry<E> getEntry(Entry<?> entry) {
        TreeEntry<E> t = root;
        while (t != null) {
            int cmp = compareLongs(getLow(entry), t.low);
            if (cmp == 0)
                cmp = compareLongs(getHigh(entry), t.high);
            if (cmp == 0)
                cmp = entry.hashCode() - t.value.hashCode();

            if (cmp < 0) {
                t = t.left;
            } else if (cmp > 0) {
                t = t.right;
            } else {
                return t;
            }
        }

        return null;
    }
330672
public void updateFromEntry(UpdateInodeEntry entry) {
    if (entry.hasAcl()) {
      setInternalAcl(ProtoUtils.fromProto(entry.getAcl()));
    }
    if (entry.hasCreationTimeMs()) {
      setCreationTimeMs(entry.getCreationTimeMs());
    }
    if (entry.hasGroup()) {
      setGroup(entry.getGroup());
    }
    if (entry.hasLastModificationTimeMs()) {
      setLastModificationTimeMs(entry.getLastModificationTimeMs(),
          entry.getOverwriteModificationTime());
    }
    if (entry.hasMode()) {
      setMode((short) entry.getMode());
    }
    if (entry.hasName()) {
      setName(entry.getName());
    }
    if (entry.hasOwner()) {
      setOwner(entry.getOwner());
    }
    if (entry.hasParentId()) {
      setParentId(entry.getParentId());
    }
    if (entry.hasPersistenceState()) {
      setPersistenceState(PersistenceState.valueOf(entry.getPersistenceState()));
    }
    if (entry.hasPinned()) {
      setPinned(entry.getPinned());
    }
    if (entry.hasTtl()) {
      setTtl(entry.getTtl());
    }
    if (entry.hasTtlAction()) {
      setTtlAction(ProtobufUtils.fromProtobuf(entry.getTtlAction()));
    }
    if (entry.hasUfsFingerprint()) {
      setUfsFingerprint(entry.getUfsFingerprint());
    }
  }
143028
private void linearScanBatchKNN(ArrayDBIDs ids, List<KNNHeap> heaps) {
    final DistanceQuery<O> dq = distanceQuery;
    // The distance is computed on database IDs
    for(DBIDIter iter = getRelation().getDBIDs().iter(); iter.valid(); iter.advance()) {
      int index = 0;
      for(DBIDIter iter2 = ids.iter(); iter2.valid(); iter2.advance(), index++) {
        KNNHeap heap = heaps.get(index);
        heap.insert(dq.distance(iter2, iter), iter);
      }
    }
  }
1108707
public void addToNavigation(CmsClientSitemapEntry entry) {

        entry.setInNavigation(true);
        CmsSitemapChange change = new CmsSitemapChange(entry.getId(), entry.getSitePath(), ChangeType.modify);
        CmsPropertyModification mod = new CmsPropertyModification(
            entry.getId(),
            CmsClientProperty.PROPERTY_NAVTEXT,
            entry.getTitle(),
            true);
        change.setPropertyChanges(Collections.singletonList(mod));
        change.setPosition(entry.getPosition());
        commitChange(change, null);
    }
1206323
public final void addEntries(Entry<?>... entries) {
        if (entries != null) {
            for (Entry<?> entry : entries) {
                entry.setCalendar(this);
            }
        }
    }
1021741
public void setDomainEntries(java.util.Collection<DomainEntry> domainEntries) {
        if (domainEntries == null) {
            this.domainEntries = null;
            return;
        }

        this.domainEntries = new java.util.ArrayList<DomainEntry>(domainEntries);
    }
472895
public void setEntries(Map<String, String> entries) {

        String[][] entriesArray = null;
        if ((entries != null) && !entries.isEmpty()) {
            entriesArray = new String[entries.size()][];
            int i = 0;
            for (Entry<String, String> entry : entries.entrySet()) {
                entriesArray[i] = new String[] {entry.getKey(), entry.getValue()};
                i++;
            }
        }

        getState().setEntries(entriesArray);
    }
962237
public void setParseSVNEntries(boolean parseSVNentries) {
		this.parseSVNentries = parseSVNentries;
		getConfig().setProperty(SPIDER_PARSE_SVN_ENTRIES, Boolean.toString(parseSVNentries));
	}
338410
public void setNodes(java.util.Collection<Node> nodes) {
        if (nodes == null) {
            this.nodes = null;
            return;
        }

        this.nodes = new java.util.ArrayList<Node>(nodes);
    }
401100
private void leafEntryIDs(MkAppTreeNode<O> node, ModifiableDBIDs result) {
    if(node.isLeaf()) {
      for(int i = 0; i < node.getNumEntries(); i++) {
        MkAppEntry entry = node.getEntry(i);
        result.add(((LeafEntry) entry).getDBID());
      }
    }
    else {
      for(int i = 0; i < node.getNumEntries(); i++) {
        MkAppTreeNode<O> childNode = getNode(node.getEntry(i));
        leafEntryIDs(childNode, result);
      }
    }
  }
605679
private void expandDirNodes(SpatialPrimitiveDistanceFunction<V> distFunction, DeLiCluNode node1, DeLiCluNode node2) {
    if(LOG.isDebuggingFinest()) {
      LOG.debugFinest("ExpandDirNodes: " + node1.getPageID() + " + " + node2.getPageID());
    }
    int numEntries_1 = node1.getNumEntries();
    int numEntries_2 = node2.getNumEntries();

    // insert all combinations of unhandled - handled children of
    // node1-node2 into pq
    for(int i = 0; i < numEntries_1; i++) {
      DeLiCluEntry entry1 = node1.getEntry(i);
      if(!entry1.hasUnhandled()) {
        continue;
      }
      for(int j = 0; j < numEntries_2; j++) {
        DeLiCluEntry entry2 = node2.getEntry(j);

        if(!entry2.hasHandled()) {
          continue;
        }
        double distance = distFunction.minDist(entry1, entry2);
        heap.add(new SpatialObjectPair(distance, entry1, entry2, true));
      }
    }
  }