Package com.browseengine.bobo.util

Examples of com.browseengine.bobo.util.BigShortArray


  private final static BigSegmentedArray newInstance(TermCountSize termCountSize,int maxDoc){
    if (termCountSize == TermCountSize.small){
      return new BigByteArray(maxDoc);
    }
    else if (termCountSize == TermCountSize.medium){
      return new BigShortArray(maxDoc);
    }
    else return new BigIntArray(maxDoc);
  }
View Full Code Here


public class BigSegmentedArrayTest extends TestCase {

  public static void testEmptyArray() {
    emptyArrayTestHelper(new BigIntArray(0));
    emptyArrayTestHelper(new BigByteArray(0));
    emptyArrayTestHelper(new BigShortArray(0));
    emptyArrayTestHelper(new LazyBigIntArray(0));
  }
View Full Code Here

  }

  public static void testCountUp() {
    countUpTestHelper(new BigIntArray(Short.MAX_VALUE * 2));
    countUpTestHelper(new LazyBigIntArray(Short.MAX_VALUE * 2));
    countUpTestHelper(new BigShortArray(Short.MAX_VALUE * 2));
    countUpTestHelper(new BigByteArray(Short.MAX_VALUE * 2));
  }
View Full Code Here

  }

  public static void testFindValues() {
    findValueHelper(new BigIntArray(Short.MAX_VALUE * 2));
    findValueHelper(new LazyBigIntArray(Short.MAX_VALUE * 2));
    findValueHelper(new BigShortArray(Short.MAX_VALUE * 2));
    findValueHelper(new BigByteArray(Short.MAX_VALUE * 2));
  }
View Full Code Here

  }

  public static void testFindValueRange() {
    findValueRangeHelper(new BigIntArray(Short.MAX_VALUE * 2));
    findValueRangeHelper(new LazyBigIntArray(Short.MAX_VALUE * 2));
    findValueRangeHelper(new BigShortArray(Short.MAX_VALUE * 2));
    findValueRangeHelper(new BigByteArray(Short.MAX_VALUE * 2));
  }
View Full Code Here

  }

  public static void testFill() {
    fillTestHelper(new BigIntArray(Short.MAX_VALUE << 1));
    fillTestHelper(new LazyBigIntArray(Short.MAX_VALUE << 1));
    fillTestHelper(new BigShortArray(Short.MAX_VALUE << 1));
    fillTestHelper(new BigByteArray(Short.MAX_VALUE << 1));
  }
View Full Code Here

    // we use < instead of <= to take into consideration "missing" value (zero element in the
    // dictionary)
    if (termCount < Byte.MAX_VALUE) {
      return new BigByteArray(maxDoc);
    } else if (termCount < Short.MAX_VALUE) {
      return new BigShortArray(maxDoc);
    } else return new BigIntArray(maxDoc);
  }
View Full Code Here

  private final static BigSegmentedArray newInstance(int termCount, int maxDoc) {
    // we use < instead of <= to take into consideration "missing" value (zero element in the dictionary)
    if (termCount < Byte.MAX_VALUE) {
      return new BigByteArray(maxDoc);
    } else if (termCount < Short.MAX_VALUE) {
      return new BigShortArray(maxDoc);
    } else
      return new BigIntArray(maxDoc);
  }
View Full Code Here

  private final static BigSegmentedArray newInstance(TermCountSize termCountSize,int maxDoc){
    if (termCountSize == TermCountSize.small){
      return new BigByteArray(maxDoc);
    }
    else if (termCountSize == TermCountSize.medium){
      return new BigShortArray(maxDoc);
    }
    else return new BigIntArray(maxDoc);
  }
View Full Code Here

    // we use < instead of <= to take into consideration "missing" value (zero element in the
    // dictionary)
    if (termCount < Byte.MAX_VALUE) {
      return new BigByteArray(maxDoc);
    } else if (termCount < Short.MAX_VALUE) {
      return new BigShortArray(maxDoc);
    } else return new BigIntArray(maxDoc);
  }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.util.BigShortArray

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.