MathUtil (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.util

## Class MathUtil

- java.lang.Object
- - org.cloudbus.cloudsim.util.MathUtil

-     public class MathUtil
      extends Object

  A class containing multiple convenient math functions. To use some of the function you must download Michael Thomas Flanagan's Java Scientific Library: http://www.ee.ucl.ac.uk/~mflanaga/java/
  Since:
    CloudSim Toolkit 3.0
  Author:
    Anton Beloglazov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MathUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double[]` | `abs(double[] data)` Abs.
    `static int` | `countNonZeroBeginning(double[] data)` Count non zero beginning of the data.
    `static int` | `countShortestRow(double[][] data)` Count shortest row.
    `static double[]` | `getLoessParameterEstimates(double[] y)` Gets the loess parameter estimates.
    `static double[]` | `getRobustLoessParameterEstimates(double[] y)` Gets the robust loess parameter estimates.
    `static double[]` | `getTricubeBisquareWeigts(double[] residuals)` Gets the tricube bisquare weigts.
    `static double[]` | `getTricubeWeigts(int n)` Gets the tricube weigts.
    `static double` | `iqr(double[] data)` Gets the IQR.
    `static double[]` | `listToArray(List<? extends Number> list)` List to array.
    `static double` | `mad(double[] data)` Gets the mad.
    `static double` | `mean(List<Double> list)` Gets the average.
    `static double` | `median(List<Double> list)` Gets the median.
    `static double` | `stDev(List<Double> list)` Gets the standard deviation.
    `static double` | `sum(List<? extends Number> list)` Sums a list of numbers.
    `static double[]` | `trimZeroTail(double[] data)` Trim zero tail.
    `static double` | `variance(List<Double> list)` Variance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MathUtil

          public MathUtil()

  - ### Method Detail

    - #### sum

          public static double sum(List<? extends Number> list)

      Sums a list of numbers.
      Parameters:
        `list` - the list
      Returns:
        the double

    - #### listToArray

          public static double[] listToArray(List<? extends Number> list)

      List to array.
      Parameters:
        `list` - the list
      Returns:
        the double[]

    - #### median

          public static double median(List<Double> list)

      Gets the median.
      Parameters:
        `list` - the list
      Returns:
        the median

    - #### mean

          public static double mean(List<Double> list)

      Gets the average.
      Parameters:
        `list` - the list
      Returns:
        the average

    - #### variance

          public static double variance(List<Double> list)

      Variance.
      Parameters:
        `list` - the list
      Returns:
        the double

    - #### stDev

          public static double stDev(List<Double> list)

      Gets the standard deviation.
      Parameters:
        `list` - the list
      Returns:
        the double

    - #### mad

          public static double mad(double[] data)

      Gets the mad.
      Parameters:
        `data` - the data
      Returns:
        the mad

    - #### iqr

          public static double iqr(double[] data)

      Gets the IQR.
      Parameters:
        `data` - the data
      Returns:
        the IQR

    - #### countNonZeroBeginning

          public static int countNonZeroBeginning(double[] data)

      Count non zero beginning of the data.
      Parameters:
        `data` - the data
      Returns:
        the int

    - #### countShortestRow

          public static int countShortestRow(double[][] data)

      Count shortest row.
      Parameters:
        `data` - the data
      Returns:
        the int

    - #### trimZeroTail

          public static double[] trimZeroTail(double[] data)

      Trim zero tail.
      Parameters:
        `data` - the data
      Returns:
        the double[]

    - #### getLoessParameterEstimates

          public static double[] getLoessParameterEstimates(double[] y)

      Gets the loess parameter estimates.
      Parameters:
        `y` - the y
      Returns:
        the loess parameter estimates

    - #### getRobustLoessParameterEstimates

          public static double[] getRobustLoessParameterEstimates(double[] y)

      Gets the robust loess parameter estimates.
      Parameters:
        `y` - the y
      Returns:
        the robust loess parameter estimates

    - #### getTricubeWeigts

          public static double[] getTricubeWeigts(int n)

      Gets the tricube weigts.
      Parameters:
        `n` - the n
      Returns:
        the tricube weigts

    - #### getTricubeBisquareWeigts

          public static double[] getTricubeBisquareWeigts(double[] residuals)

      Gets the tricube bisquare weigts.
      Parameters:
        `residuals` - the residuals
      Returns:
        the tricube bisquare weigts

    - #### abs

          public static double[] abs(double[] data)

      Abs.
      Parameters:
        `data` - the data
      Returns:
        the double[]

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.