Examples of HyperBoundingBox


Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

      Double f_min = minima.get(id);
      Double f_max = maxima.get(id);

      if(f_min == null) {
        ParameterizationFunction f = database.get(id);
        HyperBoundingBox minMax = f.determineAlphaMinMax(interval);
        f_min = f.function(SpatialUtil.getMin(minMax));
        f_max = f.function(SpatialUtil.getMax(minMax));
        minima.put(id, f_min);
        maxima.put(id, f_max);
      }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

      // left child
      else {
        max[splitDim - 1] = splitPoint;
      }

      ModifiableDBIDs childIDs = split.determineIDs(getIDs(), new HyperBoundingBox(min, max), d_min, d_max);
      if(childIDs != null) {
        // right child
        if(i == 0) {
          rightChild = new CASHInterval(min, max, split, childIDs, splitDim, childLevel, d_min, d_max);
        }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

      // best for the split axis
      bestSorting = -1;

      for(int i = 0; i <= numEntries - 2 * minEntries; i++) {
        // test the sorting with respect to the minimal values
        HyperBoundingBox mbr1 = mbr(minSorting, 0, minEntries + i);
        HyperBoundingBox mbr2 = mbr(minSorting, minEntries + i, numEntries);
        double currentOverlap = SpatialUtil.relativeOverlap(mbr1, mbr2);
        double vol1 = SpatialUtil.volume(mbr1);
        double vol2 = SpatialUtil.volume(mbr2);
        if(currentOverlap < minOverlap || (currentOverlap == minOverlap && (vol1 + vol2) < volume)) {
          minOverlap = currentOverlap;
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

          if(max[d - 1] < currMBR.getMax(d)) {
            max[d - 1] = currMBR.getMax(d);
          }
        }
      }
      return new HyperBoundingBox(min, max);
    }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

  public <N extends Node<E>, E extends SpatialEntry> TreeIndexPathComponent<E> findInsertChild(N node, SpatialComparable mbr) {
    Enlargement<E> min = null;

    for(int i = 0; i < node.getNumEntries(); i++) {
      E entry_i = node.getEntry(i);
      HyperBoundingBox newMBR = SpatialUtil.unionTolerant(mbr, entry_i);

      double currOverlap = 0;
      double newOverlap = 0;
      for(int k = 0; k < node.getNumEntries(); k++) {
        if(i != k) {
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

    Enlargement<E> min = null;

    TopBoundedHeap<FCPair<Double, E>> entriesToTest = new TopBoundedHeap<FCPair<Double, E>>(insertionCandidates, Collections.reverseOrder());
    for(int i = 0; i < node.getNumEntries(); i++) {
      E entry_i = node.getEntry(i);
      HyperBoundingBox newMBR = SpatialUtil.unionTolerant(mbr, entry_i);
      double volume = /* entry_i.getMBR() == null ? 0 : */SpatialUtil.volume(entry_i);
      double inc_volume = SpatialUtil.volume(newMBR) - volume;
      entriesToTest.add(new FCPair<Double, E>(inc_volume, entry_i));
    }

    while(!entriesToTest.isEmpty()) {
      E entry_i = entriesToTest.poll().getSecond();
      int index = -1;
      HyperBoundingBox newMBR = SpatialUtil.unionTolerant(mbr, entry_i);

      double currOverlap = 0;
      double newOverlap = 0;
      for(int k = 0; k < node.getNumEntries(); k++) {
        E entry_k = node.getEntry(k);
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

    /* Simulate the creation of a directory page to get the capacity */
    try {
      int cap = 0;
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      HyperBoundingBox hb = new HyperBoundingBox(new double[exampleLeaf.getDimensionality()], new double[exampleLeaf.getDimensionality()]);
      SpatialDirectoryEntry sl = new SpatialDirectoryEntry(0, hb);
      while(baos.size() <= getPageSize()) {
        sl.writeExternal(oos);
        oos.flush();
        cap++;
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

    writeNode(root);
    writeNode(oldRoot);
    writeNode(newNode);
    if(getLogger().isDebugging()) {
      String msg = "Create new Root: ID=" + root.getPageID();
      msg += "\nchild1 " + oldRoot + " " + new HyperBoundingBox(oldRoot) + " " + new HyperBoundingBox(oldRootEntry);
      msg += "\nchild2 " + newNode + " " + new HyperBoundingBox(newNode) + " " + new HyperBoundingBox(newNodeEntry);
      msg += "\n";
      getLogger().debugFine(msg);
    }
 
    return new IndexTreePath<E>(new TreeIndexPathComponent<E>(getRootEntry(), null));
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

    Enlargement<E> min = null;

    for(int i = 0; i < node.getNumEntries(); i++) {
      E entry = node.getEntry(i);
      double volume = SpatialUtil.volume(entry);
      HyperBoundingBox newMBR = SpatialUtil.union(entry, mbr);
      double inc = SpatialUtil.volume(newMBR) - volume;
      Enlargement<E> enlargement = new Enlargement<E>(new TreeIndexPathComponent<E>(entry, i), volume, inc, 0);

      if(min == null || min.compareTo(enlargement) > 0) {
        min = enlargement;
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.data.HyperBoundingBox

      }
      else {
        d_maxs[i] = d_max - d_mins[i];
      }

      HyperBoundingBox alphaInterval = new HyperBoundingBox(alphaMin, alphaMax);
      ModifiableDBIDs intervalIDs = split.determineIDs(ids, alphaInterval, d_mins[i], d_maxs[i]);
      if(intervalIDs != null && intervalIDs.size() >= minPts) {
        CASHInterval rootInterval = new CASHInterval(alphaMin, alphaMax, split, intervalIDs, 0, 0, d_mins[i], d_maxs[i]);
        heap.add(new IntegerPriorityObject<CASHInterval>(rootInterval.priority(), rootInterval));
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.