Package ch.nolix.core.math.main
Klasse Calculator
java.lang.Object
ch.nolix.core.math.main.Calculator
The
Calculator provides mathematical functions.- Version:
- 2016-05-01
- Autor:
- Silvan Wyss
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic doublegetAbsoluteDifference(double value1, double value2) static intgetAbsoluteDifference(int value1, int value2) static longgetAbsoluteDifference(long value1, long value2) static doublegetAbsoluteValue(double value) The absolute value of a value x is -x if x is negative, x otherwise.static intgetAbsoluteValue(int value) The absolute value of a value x is -x if x is negative, x otherwise.static longgetAbsoluteValue(long value) The absolute value of a value x is -x if x is negative, x otherwise.static ARModelgetARModell(int pOrder, double[] inputValues) static doublegetAverage(double value, double... values) static intgetAverage(int value, int... values) static longgetAverage(long value, long... values) static doublegetAverage(Iterable<Double> values) static PolynomgetFittingPolynom(int degree, double[] xValues, double[] yValues) static doublegetMax(double value, double... values) static intgetMax(int value, int... values) static longgetMax(long value, long... values) static doublegetMin(double value, double... values) static intgetMin(int value, int... values) static longgetMin(long value, long... values) static doublegetSquare(double value) static doublegetSquare(int value) static doublegetSquare(long value) static doublegetSum(double value, double... values) static intgetSum(int value, int... values) static longgetSum(long value, long... values) static double
-
Methodendetails
-
getAbsoluteDifference
public static double getAbsoluteDifference(double value1, double value2) - Parameter:
value1-value2-- Gibt zurück:
- the absolute difference between the given 2 values.
-
getAbsoluteDifference
public static int getAbsoluteDifference(int value1, int value2) - Parameter:
value1-value2-- Gibt zurück:
- the absolute difference between the given 2 values.
-
getAbsoluteDifference
public static long getAbsoluteDifference(long value1, long value2) - Parameter:
value1-value2-- Gibt zurück:
- the absolute difference between the given 2 values.
-
getAbsoluteValue
public static double getAbsoluteValue(double value) The absolute value of a value x is -x if x is negative, x otherwise.- Parameter:
value-- Gibt zurück:
- the absolute value of the given value.
-
getAbsoluteValue
public static int getAbsoluteValue(int value) The absolute value of a value x is -x if x is negative, x otherwise.- Parameter:
value-- Gibt zurück:
- the absolute value of the given value.
-
getAbsoluteValue
public static long getAbsoluteValue(long value) The absolute value of a value x is -x if x is negative, x otherwise.- Parameter:
value-- Gibt zurück:
- the absolute value of the given value.
-
getAverage
public static double getAverage(double value, double... values) - Parameter:
value-values-- Gibt zurück:
- the average of the given values.
-
getAverage
- Parameter:
values-- Gibt zurück:
- the average of the given values.
- Löst aus:
EmptyArgumentException- if the given values is empty.
-
getAverage
public static int getAverage(int value, int... values) - Parameter:
value-values-- Gibt zurück:
- the average of the given values.
-
getAverage
public static long getAverage(long value, long... values) - Parameter:
value-values-- Gibt zurück:
- the average of the given values.
- Löst aus:
EmptyArgumentException- if the given values is empty.
-
getARModell
- Parameter:
pOrder-inputValues-- Gibt zurück:
- a new
ARModelwith the given pOrder and inputValues. - Löst aus:
NegativeArgumentException- if the given pOrder is negative.
-
getFittingPolynom
- Parameter:
degree-xValues-yValues-- Gibt zurück:
- a new
Polynomthat has the given degree and fits the given values - Löst aus:
NegativeArgumentException- if the given degree is negative.BiggerArgumentException- if the given degree is bigger than the count of the given xValues.InvalidArgumentException- if the count of the given yValues does not equal the count of the given xValues.
-
getMax
public static double getMax(double value, double... values) - Parameter:
value-values-- Gibt zurück:
- the biggest value of the given values.
-
getMax
public static int getMax(int value, int... values) - Parameter:
value-values-- Gibt zurück:
- the biggest value of the given values.
-
getMax
public static long getMax(long value, long... values) - Parameter:
value-values-- Gibt zurück:
- the biggest value of the given values.
-
getMin
public static double getMin(double value, double... values) - Parameter:
value-values-- Gibt zurück:
- the smallest value of the given values.
-
getMin
public static int getMin(int value, int... values) - Parameter:
value-values-- Gibt zurück:
- the smallest value of the given values.
-
getMin
public static long getMin(long value, long... values) - Parameter:
value-values-- Gibt zurück:
- the smallest value of the given values.
-
getSquare
public static double getSquare(double value) - Parameter:
value-- Gibt zurück:
- the square of the given value.
-
getSquare
public static double getSquare(int value) - Parameter:
value-- Gibt zurück:
- the square of the given value.
-
getSquare
public static double getSquare(long value) - Parameter:
value-- Gibt zurück:
- the square of the given value.
-
getSum
public static double getSum(double value, double... values) - Parameter:
value-values-- Gibt zurück:
- the sum of the given values.
-
getSum
public static int getSum(int value, int... values) - Parameter:
value-values-- Gibt zurück:
- the sum of the given values.
-
getSum
- Parameter:
values-- Gibt zurück:
- the sum of the given values.
-
getSum
public static long getSum(long value, long... values) - Parameter:
value-values-- Gibt zurück:
- the sum of the given values.
-