예제 #1
0
 @Test
 public void CirclepointsQuad() throws Exception {
   Glyphset<Rectangle2D, Object> glyphs =
       GlyphsetUtils.autoLoad(
           new File("../data/circlepoints.csv"), 1, DynamicQuadTree.<Rectangle2D, Object>make());
   Aggregator<Object, Integer> agg = new Numbers.Count<>();
   Transfer<Number, Color> t = new Numbers.FixedInterpolate(Color.white, Color.red, 0, 25.5);
   testWith("circle_quad", glyphs, agg, t);
 }
예제 #2
0
  @Test
  public void CirclepointsMemMap() throws Exception {
    Glyphset<Point2D, Object> glyphs =
        GlyphsetUtils.autoLoad(
            new File("../data/circlepoints.hbin"),
            .001,
            new MemMapList<Point2D, Object>(
                null, new Indexed.ToPoint(false, 0, 1), new Valuer.Constant<Indexed, Object>(1)));

    Aggregator<Object, Integer> agg = new Numbers.Count<>();
    Transfer<Number, Color> t = new Numbers.FixedInterpolate(Color.white, Color.red, 0, 25.5);
    testWith("circle_mem", glyphs, agg, t);
  }