Package gnu.trove.stack

Examples of gnu.trove.stack.TIntStack.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

        assertEquals( 10, stack.peek() );
        assertEquals( 1, stack.size() );
        assertEquals( 10, stack.peek() );
        assertEquals( 1, stack.size() );

        assertEquals( 10, stack.pop() );
        assertEquals( 0, stack.size() );

        stack.push( 10 );
        stack.push( 20 );
        stack.push( 30 );
View Full Code Here

        stack.push( 10 );
        stack.push( 20 );
        stack.push( 30 );

        assertEquals( 3, stack.size() );
        assertEquals( 30, stack.pop() );
        assertEquals( 20, stack.pop() );
        assertEquals( 10, stack.pop() );
    }

View Full Code Here

        stack.push( 20 );
        stack.push( 30 );

        assertEquals( 3, stack.size() );
        assertEquals( 30, stack.pop() );
        assertEquals( 20, stack.pop() );
        assertEquals( 10, stack.pop() );
    }


    public void testArrays() {
View Full Code Here

        stack.push( 30 );

        assertEquals( 3, stack.size() );
        assertEquals( 30, stack.pop() );
        assertEquals( 20, stack.pop() );
        assertEquals( 10, stack.pop() );
    }


    public void testArrays() {
        int no_entry_value = Integer.MIN_VALUE;
View Full Code Here

        assertEquals( 0, stack.size() );

        stack.push( 10 );

        assertEquals( 1, stack.size() );
        assertEquals( 10, stack.pop() );
        assertEquals( 0, stack.size() );

        stack.push( 10 );
        stack.push( 20 );
        stack.push( 30 );
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.