Package com.browseengine.bobo.util

Examples of com.browseengine.bobo.util.LazyBigIntArray


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


    assertEquals(0, array.size());
  }

  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

    assertEquals(4000, array.findValue(c, 4000, 4000));
  }

  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

    assertEquals(10000, array.findValueRange(b, b, 9000, 10000));
  }

  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

    _dataCache=dataCache;
    _countlength = _dataCache.freqs.length;

    if (_dataCache.freqs.length <= 3096)
    {
      _count = new LazyBigIntArray(_countlength);
    } else
    {
      _count = intarraymgr.get(_countlength);
      intarraylist.add(_count);
    }
View Full Code Here

    _ospec=ospec;
    _name = name;
        _dataCache = dataCache;
        _sep = sep;
        _sepArray = sep.toCharArray();
    _count = new LazyBigIntArray(_dataCache.freqs.length);
    log.info(name +": " + _count.size());
    _orderArray = _dataCache.orderArray;
    _minHitCount = ospec.getMinHitCount();
    _maxCount = ospec.getMaxCount();
    if (_maxCount<1){
View Full Code Here

    _bucketValues.seal();
  }
 
  private BigSegmentedArray getCollapsedCounts(){
  if (_collapsedCounts==null){
    _collapsedCounts = new LazyBigIntArray(_bucketValues.size());
    FacetDataCache dataCache = _subCollector._dataCache;
    TermValueList<?> subList = dataCache.valArray;
    BigSegmentedArray subcounts = _subCollector._count;
    BitVector indexSet = new BitVector(subcounts.size());
    int c = 0;
View Full Code Here

    _predefinedRanges = new TermStringList();
    Collections.sort(predefinedRanges);
    _predefinedRanges.addAll(predefinedRanges);
    _docBase = docBase;
    _countlength = predefinedRanges.size();
    _count = new LazyBigIntArray(_countlength);
    _ranges = new GeoRange[predefinedRanges.size()];
    int index = 0;
    for(String range: predefinedRanges) {
      _ranges[index++] = parse(range);
    }
View Full Code Here

   * @return Count distribution for all the user specified range values
   */
  public BigSegmentedArray getCountDistribution() {
    BigSegmentedArray dist = null;
    if(_predefinedRanges != null) {
      dist = new LazyBigIntArray(_predefinedRanges.size());
      int distIdx = 0;
      for (int i = 0; i < _count.size(); i++) {
        int count = _count.get(i);
        dist.add(distIdx++, count);
      }
View Full Code Here

TOP

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

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.