Package gnu.trove.list.array

Examples of gnu.trove.list.array.TIntArrayList.reset()


    float furthestDistanceSq = furthestDistance * furthestDistance;
    TIntArrayList nearestIds = new TIntArrayList();
    nearest(p, rootNode, furthestDistanceSq, nearestIds);

    nearestIds.forEach(v);
    nearestIds.reset();
  }

  private void createNearestNDistanceQueue(Point p, int count, PriorityQueue distanceQueue, float furthestDistance) {
    //  return immediately if given an invalid "count" parameter
    if (count <= 0) {
View Full Code Here


              // rare case - multiple items of the same priority (distance)
              if (distanceSq == distanceQueue.getPriority()) {
                savedValues.add(value);
                savedPriority = distanceSq;
              } else {
                savedValues.reset();
              }
            }

            // if the saved values have the same distance as the
            // next one in the tree, add them back in.
View Full Code Here

            // next one in the tree, add them back in.
            if (savedValues.size() > 0 && savedPriority == distanceQueue.getPriority()) {
              for (int svi = 0; svi < savedValues.size(); svi++) {
                distanceQueue.insert(savedValues.get(svi), savedPriority);
              }
              savedValues.reset();
            }

            // narrow the search, if we have already found N items
            if (distanceQueue.getPriority() < furthestDistanceSq && distanceQueue.size() >= count) {
              furthestDistanceSq = distanceQueue.getPriority();
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.