Package cleo.search.store

Examples of cleo.search.store.IntArrayPartition


  }
 
  protected IntArrayPartition initFilterStore() {
    long startTime = System.currentTimeMillis();
   
    IntArrayPartition p = new StaticIntArrayPartition(elementStore.getIndexStart(), elementStore.capacity());
   
    try {
      for(int i = p.getIndexStart(), end = p.getIndexEnd(); i < end; i++) {
        E element = elementStore.getElement(i);
        if(element != null) {
          p.set(i, bloomFilter.computeIndexFilter(element));
        }
      }
    } catch(Exception e) {
      getLogger().error("failed to initialize filter store");
    }
View Full Code Here


  }
 
  protected IntArrayPartition initFilterStore() {
    long startTime = System.currentTimeMillis();
   
    IntArrayPartition p = new StaticIntArrayPartition(elementStore.getIndexStart(), elementStore.capacity());
   
    try {
      for(int i = p.getIndexStart(), end = p.getIndexEnd(); i < end; i++) {
        E element = elementStore.getElement(i);
        if(element != null) {
          p.set(i, bloomFilter.computeIndexFilter(element));
        }
      }
    } catch(Exception e) {
      getLogger().error("failed to initialize filter store");
    }
View Full Code Here

  public void testMinMaxOnIntArrayPartition() {
    int min = Integer.MAX_VALUE;
    int max = Integer.MIN_VALUE;
   
    // Normal case
    IntArrayPartition p = new StaticIntArrayPartition(rand.nextInt(1000), 1000);
    for(int i = p.getIndexStart(), end = p.getIndexEnd(); i < end; i++) {
      int val = rand.nextInt();
      if(val > max) max = val;
      if(val < min) min = val;
      p.set(i, val);
    }
   
    assertEquals(max, Stores.max(p));
    assertEquals(min, Stores.min(p));
   
View Full Code Here

TOP

Related Classes of cleo.search.store.IntArrayPartition

Copyright © 2018 www.massapicom. 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.