Class Statistics

java.lang.Object
com.adriangarcia.statistics.Statistics

public class Statistics extends Object
Statistics class is in charge of calculating the basic statistics:
  1. Best value
  2. Mean
  3. Median
  4. Standard deviation
  5. Worst value
  6. Feasibility rate
  7. Success rate
  8. Successful performance
Version:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor method
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    best(double[] obj)
    This method generates the best of a vector.
    double[]
    best(double[][] obj)
    This method generates an best vector of a matrix.
    double
    best(double[][] obj, int column)
    This method calculates the best of a specified column given a matrix.
    double[]
    bestRow(double[][] obj, int column)
    This method calculates the best Row of a specified column given a matrix.
    double
    feasibleRate(double[][] obj, int column)
    This method calculates the feasible Rate of a specified column given a matrix.
    double[]
    getColumns(double[][] obj, int column)
     
    double
    mean(double[] obj)
    This method generates the mean of a vector.
    double[]
    mean(double[][] obj)
    This method generates an mean vector of a matrix.
    double
    mean(double[][] obj, int column)
    This method calculates the mean of a specified column given a matrix.
    double
    median(double[] obj)
    This method generates the median of a vector.
    double[]
    median(double[][] obj)
    This method generates an median vector of a matrix.
    double
    median(double[][] obj, int column)
    This method calculates the median of a specified column given a matrix.
    double
    standardDeviation(double[] obj)
    This method generates the standardDeviation of a vector.
    double[]
    standardDeviation(double[][] obj)
    This method generates an standardDeviation vector of a matrix.
    double
    standardDeviation(double[][] obj, int column)
    This method calculates the standardDeviation of a specified column given a matrix.
    int
    successPerformance(double[][] obj, double bestKnownValue)
    This method calculates the success Performance of a specified column given a matrix.
    double
    successRate(double[][] obj, int column, double bestKnownValue)
    This method calculates the success Rate of a specified column given a matrix.
    double
    summation(double[] obj)
    Method that sums all elements of a vector.
    double
    worst(double[] obj)
    This method generates the worst of a vector.
    double[]
    worst(double[][] obj)
    This method generates an worst vector of a matrix.
    double
    worst(double[][] obj, int column)
    This method calculates the worst of a specified column given a matrix.
    double[]
    worstRow(double[][] obj, int column)
    This method calculates the worst Row of a specified column given a matrix.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Statistics

      public Statistics()
      Constructor method
  • Method Details

    • mean

      public double mean(double[] obj)
      This method generates the mean of a vector.
      Parameters:
      obj - real number vector
      Returns:
      mean of a given vector
    • mean

      public double[] mean(double[][] obj)
      This method generates an mean vector of a matrix.
      Parameters:
      obj - real number matrix
      Returns:
      mean vector of a given matrix
    • mean

      public double mean(double[][] obj, int column)
      This method calculates the mean of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the mean
      Returns:
      mean of a given vector
    • standardDeviation

      public double standardDeviation(double[] obj)
      This method generates the standardDeviation of a vector.
      Parameters:
      obj - real number vector
      Returns:
      standardDeviation of a given vector
    • standardDeviation

      public double[] standardDeviation(double[][] obj)
      This method generates an standardDeviation vector of a matrix.
      Parameters:
      obj - real number matrix
      Returns:
      standardDeviation vector of a given matrix
    • standardDeviation

      public double standardDeviation(double[][] obj, int column)
      This method calculates the standardDeviation of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the standardDeviation
      Returns:
      standardDeviation of a given vector
    • median

      public double median(double[] obj)
      This method generates the median of a vector.
      Parameters:
      obj - real number vector
      Returns:
      median of a given vector
    • median

      public double[] median(double[][] obj)
      This method generates an median vector of a matrix.
      Parameters:
      obj - real number matrix
      Returns:
      median vector of a given matrix
    • median

      public double median(double[][] obj, int column)
      This method calculates the median of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the median
      Returns:
      median of a given vector
    • best

      public double best(double[] obj)
      This method generates the best of a vector.
      Parameters:
      obj - real number vector
      Returns:
      best of a given vector
    • best

      public double[] best(double[][] obj)
      This method generates an best vector of a matrix.
      Parameters:
      obj - real number matrix
      Returns:
      best vector of a given matrix
    • best

      public double best(double[][] obj, int column)
      This method calculates the best of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the best
      Returns:
      best of a given vector
    • bestRow

      public double[] bestRow(double[][] obj, int column)
      This method calculates the best Row of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the best Row
      Returns:
      best Row of a given vector
    • worst

      public double worst(double[] obj)
      This method generates the worst of a vector.
      Parameters:
      obj - real number vector
      Returns:
      worst of a given vector
    • worst

      public double[] worst(double[][] obj)
      This method generates an worst vector of a matrix.
      Parameters:
      obj - real number matrix
      Returns:
      worst vector of a given matrix
    • worst

      public double worst(double[][] obj, int column)
      This method calculates the worst of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the worst
      Returns:
      worst of a given vector
    • worstRow

      public double[] worstRow(double[][] obj, int column)
      This method calculates the worst Row of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the worst Row
      Returns:
      worst Row of a given vector
    • summation

      public double summation(double[] obj)
      Method that sums all elements of a vector.
      Parameters:
      obj - real number vector
      Returns:
      vector sum
    • feasibleRate

      public double feasibleRate(double[][] obj, int column)
      This method calculates the feasible Rate of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the feasible Rate
      Returns:
      feasible Rate of a given vector
    • successRate

      public double successRate(double[][] obj, int column, double bestKnownValue)
      This method calculates the success Rate of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      column - column number to calculate the success Rate
      bestKnownValue - best known value of CNOP
      Returns:
      success Rate of a given vector
    • successPerformance

      public int successPerformance(double[][] obj, double bestKnownValue)
      This method calculates the success Performance of a specified column given a matrix.
      Parameters:
      obj - real number matrix
      bestKnownValue - best known value of CNOP
      Returns:
      success Performance of a given vector
    • getColumns

      public double[] getColumns(double[][] obj, int column)
      Parameters:
      obj - real number vector
      column - column vector to obtain
      Returns:
      column vector