Lines Matching defs:ai
32 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
33 assertEquals(0.0, ai.get());
40 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
41 ai.accumulate(2.0);
42 assertEquals(2.0, ai.get());
43 ai.accumulate(-4.0);
44 assertEquals(2.0, ai.get());
45 ai.accumulate(4.0);
46 assertEquals(4.0, ai.get());
53 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
54 ai.accumulate(2.0);
55 assertEquals(2.0, ai.get());
56 ai.reset();
57 assertEquals(0.0, ai.get());
64 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
65 ai.accumulate(2.0);
66 assertEquals(2.0, ai.get());
67 assertEquals(2.0, ai.getThenReset());
68 assertEquals(0.0, ai.get());
75 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
76 assertEquals("0.0", ai.toString());
77 ai.accumulate(1.0);
78 assertEquals(Double.toString(1.0), ai.toString());
85 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
86 assertEquals(0, ai.intValue());
87 ai.accumulate(1.0);
88 assertEquals(1, ai.intValue());
95 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
96 assertEquals(0, ai.longValue());
97 ai.accumulate(1.0);
98 assertEquals(1, ai.longValue());
105 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
106 assertEquals(0.0f, ai.floatValue());
107 ai.accumulate(1.0);
108 assertEquals(1.0f, ai.floatValue());
115 DoubleAccumulator ai = new DoubleAccumulator(Double::max, 0.0);
116 assertEquals(0.0, ai.doubleValue());
117 ai.accumulate(1.0);
118 assertEquals(1.0, ai.doubleValue());