Package cleo.search.store

Examples of cleo.search.store.StaticIntArrayPartition.capacity()


   
    StaticIntArrayPartition p = new StaticIntArrayPartition(indexStart, capacity);

    assertEquals(indexStart, p.getIndexStart());
    assertEquals(indexEnd, p.getIndexEnd());
    assertEquals(capacity, p.capacity());
   
    assertTrue(p.hasIndex(p.getIndexStart()));
    assertFalse(p.hasIndex(p.getIndexStart() - 1));
   
    assertTrue(p.hasIndex(p.getIndexEnd() - 1));
View Full Code Here


    assertFalse(p.hasIndex(p.getIndexStart() - 1));
   
    assertTrue(p.hasIndex(p.getIndexEnd() - 1));
    assertFalse(p.hasIndex(p.getIndexEnd()));
   
    for(int i = 0, cnt = rand.nextInt(p.capacity()); i < cnt; i++) {
      int index = indexStart + rand.nextInt(capacity);
      int value = rand.nextInt();
     
      p.set(index, value);
      assertEquals(value, p.get(index));
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.