Java mean meanSquare(float[] a, int off, int length)

Here you can find the source of meanSquare(float[] a, int off, int length)

Description

mean Square

License

Open Source License

Declaration

public static float meanSquare(float[] a, int off, int length) 

Method Source Code

//package com.java2s;
/*/*www .  j  ava 2  s  .c o  m*/
 *  Util.java
 *  (FScape)
 *
 *  Copyright (c) 2001-2015 Hanns Holger Rutz. All rights reserved.
 *
 *  This software is published under the GNU General Public License v3+
 *
 *
 *   For further information, please contact Hanns Holger Rutz at
 *   contact@sciss.de
 *
 *
 *  Changelog:
 *      17-Jun-07   extended
 */

public class Main {
    public static float meanSquare(float[] a, int off, int length) {
        double d = 0.0, d1;
        final int stop = off + length;
        while (off < stop) {
            d1 = a[off++];
            d += d1 * d1;
        }
        return (float) (d / length);
    }
}

Related

  1. meanImage(float[][]... images)
  2. meanLow(final int a, final int b)
  3. means(double[][] input)
  4. meanSlow(final double[] values)
  5. meanSml(final int a, final int b)
  6. meanSquaredError(double[] x, double[] y)
  7. meanSquaredError(double[][] vectorBatch1, double[][] vectorBatch2)
  8. meanWithoutZeros(int[] in, int x1, int x2)
  9. meanWithoutZerosCentered(int[] in, int center, int width)