Package com.adriangarcia.statistics
Class Statistics
java.lang.Object
com.adriangarcia.statistics.Statistics
Statistics class is in charge of calculating the basic statistics:
- Best value
- Mean
- Median
- Standard deviation
- Worst value
- Feasibility rate
- Success rate
- Successful performance
- Version:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
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.
-
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 matrixcolumn
- 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 matrixcolumn
- 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 matrixcolumn
- 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 matrixcolumn
- 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 matrixcolumn
- 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 matrixcolumn
- 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 matrixcolumn
- 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 matrixcolumn
- 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 matrixcolumn
- column number to calculate the success RatebestKnownValue
- 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 matrixbestKnownValue
- best known value of CNOP- Returns:
- success Performance of a given vector
-
getColumns
public double[] getColumns(double[][] obj, int column) - Parameters:
obj
- real number vectorcolumn
- column vector to obtain- Returns:
- column vector
-