Examples of Max


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

                sstats.addValue(values[j]);
            }
            TestUtils.assertEquals(dstats.getMean(), sstats.getMean(), tol);
            TestUtils.assertEquals(new Mean().evaluate(values), dstats.getMean(), tol);
            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);
View Full Code Here

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

        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.Max

  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.Max

        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.Max

                sstats.addValue(values[j]);
            }
            TestUtils.assertEquals(dstats.getMean(), sstats.getMean(), tol);
            TestUtils.assertEquals(new Mean().evaluate(values), dstats.getMean(), tol);
            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);
View Full Code Here

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

    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);
        testStorelessUnivariateStatistic(sum, 6.01312177E8);
View Full Code Here

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

        }
        return this.min;
    }
    private Max _getMax() {
        if (this.max == null) {
            this.max = new Max();
        }
        return this.max;
    }
View Full Code Here

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

            Expression e = new Max(v,true);*/

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

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

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

      v.clear();
      v.add(propertySensor7);
      v.add(propertySensor8);
      Expression eps4 = new Max(v,true);
   
      v.clear();
      v.add(propertySensor9);
      v.add(propertySensor10);
      Expression eps5 = new Max(v,true);
   
            assertTrue(Math.max(sn2, in1)- ((Number) emix1.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(in2, ln1)- ((Number) emix2.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(ln2, fn1)- ((Number) emix3.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(fn2, dn1)- ((Number) emix4.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(dn2, sn1)- ((Number) emix5.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(sn1, sn2)- ((Number) eps1.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(in1, in2)- ((Number) eps2.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(ln1, ln2)- ((Number) eps3.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(fn1, fn2)- ((Number) eps4.evaluate()).doubleValue()== 0);
            assertTrue(Math.max(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());                   
      assertSame((new Float(fn1).getClass()), (eps4.evaluate()).getClass());                   
View Full Code Here

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

        public SenderMetrics(Metrics metrics) {
            this.metrics = metrics;

            this.batchSizeSensor = metrics.sensor("batch-size");
            this.batchSizeSensor.add("batch-size-avg", "The average number of bytes sent per partition per-request.", new Avg());
            this.batchSizeSensor.add("batch-size-max", "The max number of bytes sent per partition per-request.", new Max());

            this.compressionRateSensor = metrics.sensor("compression-rate");
            this.compressionRateSensor.add("compression-rate-avg", "The average compression rate of record batches.", new Avg());

            this.queueTimeSensor = metrics.sensor("queue-time");
            this.queueTimeSensor.add("record-queue-time-avg",
                                     "The average time in ms record batches spent in the record accumulator.",
                                     new Avg());
            this.queueTimeSensor.add("record-queue-time-max",
                                     "The maximum time in ms record batches spent in the record accumulator.",
                                     new Max());

            this.requestTimeSensor = metrics.sensor("request-time");
            this.requestTimeSensor.add("request-latency-avg", "The average request latency in ms", new Avg());
            this.requestTimeSensor.add("request-latency-max", "The maximum request latency in ms", new Max());

            this.recordsPerRequestSensor = metrics.sensor("records-per-request");
            this.recordsPerRequestSensor.add("record-send-rate", "The average number of records sent per second.", new Rate());
            this.recordsPerRequestSensor.add("records-per-request-avg", "The average number of records per request.", new Avg());

            this.retrySensor = metrics.sensor("record-retries");
            this.retrySensor.add("record-retry-rate", "The average per-second number of retried record sends", new Rate());

            this.errorSensor = metrics.sensor("errors");
            this.errorSensor.add("record-error-rate", "The average per-second number of record sends that resulted in errors", new Rate());

            this.maxRecordSizeSensor = metrics.sensor("record-size-max");
            this.maxRecordSizeSensor.add("record-size-max", "The maximum record size", new Max());
            this.maxRecordSizeSensor.add("record-size-avg", "The average record size", new Avg());

            this.metrics.addMetric("requests-in-flight", "The current number of in-flight requests awaiting a response.", new Measurable() {
                public double measure(MetricConfig config, long now) {
                    return client.inFlightRequestCount();
View Full Code Here

Examples of org.apache.pig.builtin.MAX

        } else if ("max(int)".equalsIgnoreCase(agg)) {
            func = new IntMax();
        } else if ("max(chararray)".equalsIgnoreCase(agg)) {
            func = new StringMax();
        } else if ("max(bytearray)".equalsIgnoreCase(agg)) {
            func = new MAX();
        } else if ("row_number".equalsIgnoreCase(agg)) {
            func = new RowNumber();
        } else if ("first_value".equalsIgnoreCase(agg)) {
            func = new FirstValue();
        } else if ("last_value".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.