Package com.google.uzaygezen.core

Examples of com.google.uzaygezen.core.LongContent


    List<LongRange> x0y0 = ImmutableList.of(x0, y0);
    list.add(x0y0);
    list.add(x0y0);
    List<LongRange> x1y1 = ImmutableList.of(x1, y1);
    list.add(x1y1);
    LongContent actual = new LongContent(0);
    RangeUtil.overlapSum(x0y0, list, LongRangeHome.INSTANCE, actual);
    Assert.assertEquals(8 + ((x0.getEnd() - x0.getStart()) * (y0.getEnd() - y0.getStart()) << 1), actual.value());
  }
View Full Code Here


  public boolean contains(Long point) {
    return start <= point & end > point;
 
 
  public LongContent length() {
    return new LongContent(end - start);
  }
View Full Code Here

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

    final LongContent zero = new LongContent(
        0L);
    final List<LongRange> region = new ArrayList<LongRange>(
        dimensionDefinitions.length);
    for (int d = 0; d < dimensionDefinitions.length; d++) {

      final long normalizedMin = normalizeDimension(
          dimensionDefinitions[d],
          rangePerDimension[d].getMin(),
          binsPerDimension[d]);
      final long normalizedMax = normalizeDimension(
          dimensionDefinitions[d],
          rangePerDimension[d].getMax(),
          binsPerDimension[d]);
      minRangeList.add(normalizedMin);
      maxRangeList.add(normalizedMax);
      region.add(LongRange.of(
          normalizedMin,
          normalizedMax + 1L));

    }

    final long minQuadSize = getMinimumQuadSize(
        minRangeList,
        maxRangeList);

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

TOP

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

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.