Examples of average()


Examples of calculator.sci.SciCalculatorService.average()

        SciCalculatorService sciCalculator =
            (SciCalculatorService)context.locateService(SciCalculatorService.class, "sciCalculatorService");
        double values[] = {1.0D, 2D, 3D, 4D, 5D, 6D, 7D, 8D, 9D};
        System.out.println("\tInvoking Java Implementation  ... ");
        System.out.println((new StringBuilder()).append("\tAverage of 1,2,3,4,5,6,7,8,9 = ")
            .append(sciCalculator.average(values)).toString());
        System.out.println("\n\tInvoking JavaScript Implementation  ... ");
        System.out.println((new StringBuilder()).append("\tSquare Root of 81 = ").append(sciCalculator
            .sqrt(81D)).toString());
        System.out.println("\tInvoking Java Implementation configured for Property  ... ");
        System.out.println((new StringBuilder()).append("\tSine 90 Degrees = ")
View Full Code Here

Examples of com.github.axet.starjeweled.common.RangeColor.average()

                String s = m.get(x, y);
                RangeColor r = colors.getColor(s);
                if (r == null) {
                    setColor(new MatrixPoint(x, y), Color.BLACK.getRGB());
                } else {
                    setColor(new MatrixPoint(x, y), r.average());
                }
            }
        }
    }
View Full Code Here

Examples of de.torstennahm.statistics.Statistics.average()

    double[] x = new double[dimension];
    final Statistics statistics = new Statistics();
   
    IntegrationResult result = new IntegrationResult() {
      public double value() {
        return statistics.average();
      }
 
      public double errorEstimate() {
        if (statistics.n() >= MIN_EVALUATIONS) {
          return (statistics.sigma() / Math.sqrt(statistics.n() - 1)) *
 
View Full Code Here

Examples of de.torstennahm.statistics.Statistics.average()

          t += qEst;
          u += Math.log(var);
          entryNum++;
        }
       
        double q = (qStat.average() + qStat.sigma() / Math.sqrt(qStat.n() - 1));
        if (0 < q && q < 1) {
          qB = new double[2];
          qB[0] = q;
          qB[1] = totalVar / (Math.pow(q, -n) - 1);
        }
View Full Code Here

Examples of eu.scape_project.planning.model.values.TargetValues.average()

    }

    @Test
    public void testAverageEmptyList() {
        TargetValues values = new TargetValues();
        assertEquals(0.0, values.average(), EPSILON);
    }

}
View Full Code Here

Examples of net.jcores.jre.cores.CoreNumber.average()

     */
    @SuppressWarnings("boxing")
    public static void main(String[] args) {
        CoreNumber number = $(2.0, 4, 6, null, 8, 100);

        System.out.println(number.average());
        System.out.println(number.variance());
       
        System.out.println($.range(1, 50000).random(10).as(CoreNumber.class).standarddeviation());
        System.out.println($.range(1, 50).random(6).string().join(" "));
        System.out.println($.range(1, 50).random(1.0).string().join(" "));
View Full Code Here

Examples of net.jcores.jre.cores.CoreNumber.average()

    public void testNullNaN() {
        final CoreObject<Object> mixed = $($.create(1, 100), $.create(null, 100), $.create(Double.NaN, 100)).expand(Object.class);
        final CoreNumber number = mixed.random(1.0).as(CoreNumber.class);
       
        Assert.assertEquals(100, number.sum(), 0.01);
        Assert.assertEquals(1, number.average(), 0.01);
    }
}
View Full Code Here

Examples of umontreal.iro.lecuyer.simevents.Accumulate.average()

    str.append (12, 3, 2, statUtil.average());
    str.append (PrintfFormat.NEWLINE + "   Queue Size  ");
    str.append (8, (int)(sizeWait.min()+0.5));
    str.append (11, (int)(sizeWait.max()+0.5));
    str.append (12, 3, 2, sizeWait.average());

    str.append (PrintfFormat.NEWLINE + "   Wait    ");
    str.append (12, 3, 2, sojWait.min()).append (' ');
    str.append (10, 3, 2, sojWait.max()).append (' ');
    str.append (11, 3, 2, sojWait.average()).append (' ');
View Full Code Here

Examples of umontreal.iro.lecuyer.simevents.Accumulate.average()

    str.append (12, 3, 2, statAvail.average());

    str.append (PrintfFormat.NEWLINE + "   Queue Size  ");
    str.append (8, (int)(sizeWait.min()+0.5));
    str.append (11, (int)(sizeWait.max()+0.5));
    str.append (12, 3, 2, sizeWait.average());

    str.append (PrintfFormat.NEWLINE + "   Wait    ");
    str.append (12, 3, 2, sojWait.min()).append (' ');
    str.append (10, 3, 2, sojWait.max()).append (' ');
    str.append (11, 3, 2, sojWait.average()).append (' ');
View Full Code Here

Examples of umontreal.iro.lecuyer.stat.Tally.average()

      PointSetIterator stream = p.iterator ();
      for (int j=0; j<m; j++) {
          p.randomize (noise);
          stream.resetStartStream();
          simulateRuns (p.getNumPoints(), stream, statValue);
          statQMC.add (statValue.average());
      }
   }


   public static void main (String[] args) {
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.