Package gnu.trove.stack.array

Examples of gnu.trove.stack.array.TIntArrayStack.pop()


        for (int i = startIndex; i < n.entryCount; i++) {
          if (Rectangle.distanceSq(n.entriesMinX[i], n.entriesMinY[i],
                                 n.entriesMaxX[i], n.entriesMaxY[i],
                                 p.x, p.y) <= furthestDistanceSq) {
            parents.push(n.ids[i]);
            parentsEntry.pop();
            parentsEntry.push(i); // this becomes the start index when the child has been searched
            parentsEntry.push(-1);
            near = true;
            break; // ie go to next iteration of while()
          }
View Full Code Here


            }
          }
        }
      }
      parents.pop();
      parentsEntry.pop();
    }
  }

  /**
   * @see net.sf.jsi.SpatialIndex#nearestNUnsorted(Point, TIntProcedure, int, float)
View Full Code Here

        boolean intersects = false;
        for (int i = startIndex; i < n.entryCount; i++) {
          if (Rectangle.intersects(r.minX, r.minY, r.maxX, r.maxY,
                                   n.entriesMinX[i], n.entriesMinY[i], n.entriesMaxX[i], n.entriesMaxY[i])) {
            parents.push(n.ids[i]);
            parentsEntry.pop();
            parentsEntry.push(i); // this becomes the start index when the child has been searched
            parentsEntry.push(-1);
            intersects = true;
            break; // ie go to next iteration of while()
          }
View Full Code Here

            }
          }
        }
      }
      parents.pop();
      parentsEntry.pop();
    }
  }

  /**
   * @see net.sf.jsi.SpatialIndex#size()
View Full Code Here

    // Entries from eliminated leaf nodes are reinserted in tree leaves as in
    // Insert(), but entries from higher level nodes must be placed higher in
    // the tree, so that leaves of their dependent subtrees will be on the same
    // level as leaves of the main tree
    while (eliminatedNodeIds.size() > 0) {
      Node e = getNode(eliminatedNodeIds.pop());
      for (int j = 0; j < e.entryCount; j++) {
        add(e.entriesMinX[j], e.entriesMinY[j], e.entriesMaxX[j], e.entriesMaxY[j], e.ids[j], e.level);
        e.ids[j] = -1;
      }
      e.entryCount = 0;
View Full Code Here

          stack.push(i);
        } else if (secondary.charAt(i) == closeBracket) {
          if (stack.size() == 0) {
            return false;
          }
          final int start = stack.pop();
          ans.add(new IntPair(start, i));
        }
      }
      if (stack.size() != 0) {
        return false;
View Full Code Here

      stack.clear();
      for (int i = 0; i < secondary.length(); i++) {
        if (secondary.charAt(i) == openBracket) {
          stack.push(i);
        } else if (secondary.charAt(i) == closeBracket) {
          final int start = stack.pop();
          ans.add(new IntPair(start, i));
        }
      }
    }
    return ans;
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.