Examples of Min


Examples of org.apache.commons.math3.stat.descriptive.rank.Min

  private final Min min;
  private final Max max;

  public RunningStatistics() {
    this.mean = new Mean();
    this.min = new Min();
    this.max = new Max();
  }
View Full Code Here

Examples of org.apache.commons.math3.stat.descriptive.rank.Min

        meanImpl    = new StorelessUnivariateStatistic[k];

        for (int i = 0; i < k; ++i) {
            sumImpl[i]     = new Sum();
            sumSqImpl[i]   = new SumOfSquares();
            minImpl[i]     = new Min();
            maxImpl[i]     = new Max();
            sumLogImpl[i= new SumOfLogs();
            geoMeanImpl[i] = new GeometricMean();
            meanImpl[i]    = new Mean();
        }
View Full Code Here

Examples of org.apache.commons.math3.stat.descriptive.rank.Min

            TestUtils.assertEquals(dstats.getMax(), sstats.getMax(), tol);
            TestUtils.assertEquals(new Max().evaluate(values), dstats.getMax(), tol);
            TestUtils.assertEquals(dstats.getGeometricMean(), sstats.getGeometricMean(), tol);
            TestUtils.assertEquals(new GeometricMean().evaluate(values), dstats.getGeometricMean(), tol);
            TestUtils.assertEquals(dstats.getMin(), sstats.getMin(), tol);
            TestUtils.assertEquals(new Min().evaluate(values), dstats.getMin(), tol);
            TestUtils.assertEquals(dstats.getStandardDeviation(), sstats.getStandardDeviation(), tol);
            TestUtils.assertEquals(dstats.getVariance(), sstats.getVariance(), tol);
            TestUtils.assertEquals(new Variance().evaluate(values), dstats.getVariance(), tol);
            TestUtils.assertEquals(dstats.getSum(), sstats.getSum(), tol);
            TestUtils.assertEquals(new Sum().evaluate(values), dstats.getSum(), tol);
View Full Code Here

Examples of org.apache.commons.math3.stat.descriptive.rank.Min

    @Test
    public void testSummaryStatisticsJson() throws Exception {
        final SecondMoment secondMoment = new SecondMoment();
        final Sum sum = new Sum();
        final SumOfSquares sumsq = new SumOfSquares();
        final Min min = new Min();
        final Max max = new Max();
        final SumOfLogs sumLog = new SumOfLogs();
       
        final Random r = new Random(0);
        for (int i = 0; i < 10; i++) {
            final int nextInt = r.nextInt(100000000);
            secondMoment.increment(nextInt);
            sum.increment(nextInt);
            sumsq.increment(nextInt);
            min.increment(nextInt);
            max.increment(nextInt);
            sumLog.increment(nextInt);
        }

        testStorelessUnivariateStatistic(secondMoment, 7.513432791665536E15);
View Full Code Here

Examples of org.apache.commons.math3.stat.descriptive.rank.Min

        }
        return this.sumsq;
    }
    private Min _getMin() {
        if (this.min == null) {
            this.min = new Min();
        }
        return this.min;
    }
View Full Code Here

Examples of org.apache.imperius.spl.parser.expressions.impl.Min

            Expression e = new Min(v,true);*/
           
            v.clear();
            v.add(new ShortConstant(sn2));
            v.add(new IntegerConstant(in1));
      Expression emix1 = new Min(v,true);
      v.clear();
      v.add(new IntegerConstant(in2));
            v.add(new LongConstant(ln1));
      Expression emix2 = new Min(v,true);
      v.clear();
      v.add(new LongConstant(ln2));
            v.add(new FloatConstant(fn1));
      Expression emix3 = new Min(v,true);
      v.clear();
      v.add(new FloatConstant(fn2));
            v.add(new DoubleConstant(dn1));
            Expression emix4 = new Min(v,true);
            v.clear();
            v.add(new DoubleConstant(dn2));
            v.add(new ShortConstant(sn1));
            Expression emix5 = new Min(v,true);

      v.clear();
      v.add(propertySensor1);
      v.add(propertySensor2);
      Expression eps1 = new Min(v,true);

      v.clear();
      v.add(propertySensor3);
      v.add(propertySensor4);
      Expression eps2 = new Min(v,true);

      v.clear();
      v.add(propertySensor5);
      v.add(propertySensor6);
      Expression eps3 = new Min(v,true);

      v.clear();
      v.add(propertySensor7);
      v.add(propertySensor8);
      Expression eps4 = new Min(v,true);
   
      v.clear();
      v.add(propertySensor9);
      v.add(propertySensor10);
      Expression eps5 = new Min(v,true);

            assertTrue(Math.min(sn2, in1)- ((Number) emix1.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(in2, ln1)- ((Number) emix2.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(ln2, fn1)- ((Number) emix3.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(fn2, dn1)- ((Number) emix4.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(dn2, sn1)- ((Number) emix5.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(sn1, sn2)- ((Number) eps1.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(in1, in2)- ((Number) eps2.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(ln1, ln2)- ((Number) eps3.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(fn1, fn2)- ((Number) eps4.evaluate()).doubleValue()== 0);
            assertTrue(Math.min(dn1, dn2)- ((Number) eps5.evaluate()).doubleValue()== 0);

/*
      assertSame((new Short(sn1).getClass()), (eps1.evaluate()).getClass());                   
      assertSame((new Integer(in1).getClass()), (eps2.evaluate()).getClass());                   
      assertSame((new Long(ln1).getClass()), (eps3.evaluate()).getClass());                   
View Full Code Here

Examples of org.apache.kafka.common.metrics.stats.Min

        ConstantMeasurable measurable = new ConstantMeasurable();
        metrics.addMetric("direct.measurable", measurable);
        Sensor s = metrics.sensor("test.sensor");
        s.add("test.avg", new Avg());
        s.add("test.max", new Max());
        s.add("test.min", new Min());
        s.add("test.rate", new Rate(TimeUnit.SECONDS));
        s.add("test.occurences", new Rate(TimeUnit.SECONDS, new Count()));
        s.add("test.count", new Count());
        s.add(new Percentiles(100, -100, 100, BucketSizing.CONSTANT, new Percentile("test.median", 50.0), new Percentile("test.perc99_9",
                                                                                                                         99.9)));
View Full Code Here

Examples of org.apache.pig.builtin.MIN

        } else if ("min(int)".equalsIgnoreCase(agg)) {
            func = new IntMin();
        } else if ("min(chararray)".equalsIgnoreCase(agg)) {
            func = new StringMin();
        } else if ("min(bytearray)".equalsIgnoreCase(agg)) {
            func = new MIN();
        } else if ("max(double)".equalsIgnoreCase(agg)) {
            func = new DoubleMax();
        } else if ("max(float)".equalsIgnoreCase(agg)) {
            func = new FloatMax();
        } else if ("max(long)".equalsIgnoreCase(agg)) {
View Full Code Here

Examples of org.apache.pig.builtin.MIN

        } else if ("min(int)".equalsIgnoreCase(agg)) {
            func = new IntMin();
        } else if ("min(chararray)".equalsIgnoreCase(agg)) {
            func = new StringMin();
        } else if ("min(bytearray)".equalsIgnoreCase(agg)) {
            func = new MIN();
        } else if ("max(double)".equalsIgnoreCase(agg)) {
            func = new DoubleMax();
        } else if ("max(float)".equalsIgnoreCase(agg)) {
            func = new FloatMax();
        } else if ("max(long)".equalsIgnoreCase(agg)) {
View Full Code Here

Examples of org.apache.pig.builtin.MIN

        } else if ("min(int)".equalsIgnoreCase(agg)) {
            func = new IntMin();
        } else if ("min(chararray)".equalsIgnoreCase(agg)) {
            func = new StringMin();
        } else if ("min(bytearray)".equalsIgnoreCase(agg)) {
            func = new MIN();
        } else if ("max(double)".equalsIgnoreCase(agg)) {
            func = new DoubleMax();
        } else if ("max(float)".equalsIgnoreCase(agg)) {
            func = new FloatMax();
        } else if ("max(long)".equalsIgnoreCase(agg)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.