示例#1
0
 @Test
 public void testPercents() {
   for (int i = 0; i < 100; i++) {
     intColumn.add(i);
   }
   FloatColumn floatColumn = intColumn.asRatio();
   assertEquals(1.0, floatColumn.sum(), 0.1);
 }
示例#2
0
  @Test
  public void testDivide2() {
    int[] originalValues = new int[] {32, 42, 40, 57, 52, -2};
    IntColumn originals = IntColumn.create("Originals", new IntArrayList(originalValues));

    Table t = Table.create("t", originals);

    FloatColumn divided = originals.divide(3.3);
    System.out.println(divided.print());
  }