Package com.google.uzaygezen.core

Examples of com.google.uzaygezen.core.BigIntegerContent


    BitVector[] path = new BitVector[elementLengths.length];
    for (int i = 0; i < path.length; ++i) {
      path[i] = BitVectorFactories.OPTIMAL.apply(elementLengths[path.length - i - 1]);
    }
    StreamingRollup<BitVector, BigIntegerContent> rollup = BoundedRollup.create(
      new BigIntegerContent(BigInteger.ZERO), cacheSize);
    Scan fullScan = new Scan();
    ResultScanner scanner = table.getScanner(fullScan);
    BitVector hilbertIndex = BitVectorFactories.OPTIMAL.apply(spec.sumBitsPerDimension());
    for (Result row : scanner) {
      hilbertIndex.copyFromBigEndian(row.getRow());
      for (int i = 0; i < path.length; ++i) {
        path[i] = path[i].clone();
      }
      BitVectorMath.split(hilbertIndex, path);
      // We should say the exact number of times. Saying one is correct, but
      // suboptimal.
      BigIntegerContent v = new BigIntegerContent(BigInteger.ONE);
      rollup.feedRow(Iterators.<BitVector>forArray(path), v);
    }
    MapNode<BitVector, BigIntegerContent> rolledupTree = rollup.finish();
    Pow2LengthBitSetRangeFactory<BigIntegerContent> factory = Pow2LengthBitSetRangeFactory.create(Ints.asList(elementLengths));
    Map<Pow2LengthBitSetRange, NodeValue<BigIntegerContent>> rolledupMap = factory.apply(rolledupTree);
View Full Code Here


  private List<FilteredIndexRange<Object, BigIntegerRange>> query(
    MockHTable table, List<BigIntegerRange> region, SpaceFillingCurve sfc, int maxRanges,
    Map<Pow2LengthBitSetRange, NodeValue<BigIntegerContent>> rolledupMap) {
    List<? extends List<BigIntegerRange>> x = ImmutableList.of(region);
    BigIntegerContent zero = new BigIntegerContent(BigInteger.ZERO);
    Object filter = "";
    BigIntegerContent one = new BigIntegerContent(BigInteger.ONE);
    RegionInspector<Object, BigIntegerContent> simpleRegionInspector = SimpleRegionInspector.create(
      x, one, Functions.constant(filter), BigIntegerRangeHome.INSTANCE, zero);
    final RegionInspector<Object, BigIntegerContent> regionInspector;
    if (rolledupMap == null) {
      regionInspector = simpleRegionInspector;
View Full Code Here

    return end;
  }

  @Override
  public BigIntegerContent length() {
    return new BigIntegerContent(end.subtract(start));
  }
View Full Code Here

                      // maximum
    // values
    final List<BigInteger> minRangeList = new ArrayList<BigInteger>();
    final List<BigInteger> maxRangeList = new ArrayList<BigInteger>();

    final BigIntegerContent zero = new BigIntegerContent(
        BigInteger.valueOf(0L));
    final List<BigIntegerRange> region = new ArrayList<BigIntegerRange>(
        dimensionDefinitions.length);
    for (int d = 0; d < dimensionDefinitions.length; d++) {

      final BigInteger normalizedMin = normalizeDimension(
          dimensionDefinitions[d],
          rangePerDimension[d].getMin(),
          binsPerDimension[d]);
      final BigInteger normalizedMax = normalizeDimension(
          dimensionDefinitions[d],
          rangePerDimension[d].getMax(),
          binsPerDimension[d]);
      minRangeList.add(normalizedMin);
      maxRangeList.add(normalizedMax);
      region.add(BigIntegerRange.of(
          normalizedMin,
          normalizedMax.add(BigInteger.ONE)));

    }

    final BigInteger minQuadSize = getMinimumQuadSize(
        minRangeList,
        maxRangeList);

    final RegionInspector<BigIntegerRange, BigIntegerContent> regionInspector = SimpleRegionInspector.create(
        ImmutableList.of(region),
        new BigIntegerContent(
            minQuadSize),
        Functions.<BigIntegerRange> identity(),
        BigIntegerRangeHome.INSTANCE,
        zero);
View Full Code Here

TOP

Related Classes of com.google.uzaygezen.core.BigIntegerContent

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.