Package java.util

Examples of java.util.Random.nextFloat()


  @Test
  public void testSplitOccursRoaring()
  {
    Random rand = new Random();
    for (int i = 0; i < 100; i++) {
      roaringtree.insert(new float[]{rand.nextFloat(), rand.nextFloat()}, i);
    }

    Assert.assertTrue(roaringtree.getRoot().getChildren().size() > 1);
  }
View Full Code Here


  @Test
  public void testSplitOccursRoaring()
  {
    Random rand = new Random();
    for (int i = 0; i < 100; i++) {
      roaringtree.insert(new float[]{rand.nextFloat(), rand.nextFloat()}, i);
    }

    Assert.assertTrue(roaringtree.getRoot().getChildren().size() > 1);
  }
View Full Code Here

   
    rects = new Rectangle[numRects];
    Random r = new Random();
    r.setSeed(0);
    for (int i = 0; i < numRects; i+=1) {
      rects[i] = new Rectangle(r.nextFloat(), r.nextFloat(), r.nextFloat(), r.nextFloat());
    }
   
    run(1, 2, numRects);
    run(1, 3, numRects);
    run(2, 4, numRects);
View Full Code Here

   
    rects = new Rectangle[numRects];
    Random r = new Random();
    r.setSeed(0);
    for (int i = 0; i < numRects; i+=1) {
      rects[i] = new Rectangle(r.nextFloat(), r.nextFloat(), r.nextFloat(), r.nextFloat());
    }
   
    run(1, 2, numRects);
    run(1, 3, numRects);
    run(2, 4, numRects);
View Full Code Here

   
    rects = new Rectangle[numRects];
    Random r = new Random();
    r.setSeed(0);
    for (int i = 0; i < numRects; i+=1) {
      rects[i] = new Rectangle(r.nextFloat(), r.nextFloat(), r.nextFloat(), r.nextFloat());
    }
   
    run(1, 2, numRects);
    run(1, 3, numRects);
    run(2, 4, numRects);
View Full Code Here

   
    rects = new Rectangle[numRects];
    Random r = new Random();
    r.setSeed(0);
    for (int i = 0; i < numRects; i+=1) {
      rects[i] = new Rectangle(r.nextFloat(), r.nextFloat(), r.nextFloat(), r.nextFloat());
    }
   
    run(1, 2, numRects);
    run(1, 3, numRects);
    run(2, 4, numRects);
View Full Code Here

      item.getItemProperty(Timeline.PropertyId.TIMESTAMP).setValue(
          cal.getTime());

      // set the value property
      item.getItemProperty(Timeline.PropertyId.VALUE).setValue(
          generator.nextFloat());

      cal.add(Calendar.DAY_OF_MONTH, 1);
    }
    return container;
  }
View Full Code Here

     
      //set the time stamp property
      item.getItemProperty(Timeline.PropertyId.TIMESTAMP).setValue(cal.getTime());
     
      //set the value property
      item.getItemProperty(Timeline.PropertyId.VALUE).setValue(generator.nextFloat());
     
      cal.add(Calendar.DAY_OF_YEAR, 1);
    }
    return container;
  }
View Full Code Here

          @Override
          public void buttonClick(ClickEvent event) {
            Random r = new Random();

            mark5.setLatLng(new Point2D.Double(
                22.8 + r.nextFloat() / 10, 60.4522 + r
                    .nextFloat() / 10));

            googleMap.requestRepaint();
          }
        }));
View Full Code Here

          @Override
          public void buttonClick(ClickEvent event) {
            Random r = new Random();

            mark5.setLatLng(new Point2D.Double(
                22.8 + r.nextFloat() / 10, 60.4522 + r
                    .nextFloat() / 10));

            googleMap.requestRepaint();
          }
        }));
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.