Package net.simplace.core.service
Klasse MathHelper
java.lang.Object
net.simplace.core.service.MathHelper
- Autor:
- XPMUser
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Double[]Calculates the sum of a list of valuesstatic Integer[]Calculates the sum of a list of valuesstatic NumberAVG(LinkedList aLinkedList, FWSimVariable.DATA_TYPE aDataType, int i) Calculates the average of a list of valuesstatic voidcalulateLinearRegression(int ind, double[] x, double[] y, FWSimVariable<Double> aRegressionM, FWSimVariable<Double> aRegressionB) Calculates linear regressionstatic IntegerCOUNT(LinkedList aLinkedList) static doubleGaussIntegrationWeight(int n, int i) Returns the weights for Gauß-Legendre-Integrationstatic doubleGaussIntegrationX(int n, int i) Returns the locations (x-values) for Gauß-Legendre-Integrationstatic NumberMAX(LinkedList aLinkedList, int i) Calculates the maximum of a list of valuesstatic NumberMIN(LinkedList aLinkedList, int i) Calculates the minimum of a list of valuesstatic Double[]Calculates the product of a list of valuesstatic Integer[]Calculates the product of a list of valuesstatic NumberSUM(LinkedList aLinkedList, FWSimVariable.DATA_TYPE aDataType, int i) Calculates the sum of a list of values
-
Konstruktordetails
-
MathHelper
public MathHelper()
-
-
Methodendetails
-
MAX
Calculates the maximum of a list of values- Parameter:
aLinkedList- list of valuesi-- Gibt zurück:
- the maximum
-
MIN
Calculates the minimum of a list of values- Parameter:
aLinkedList- list of valuesi-- Gibt zurück:
- the minimum
-
AVG
Calculates the average of a list of values- Parameter:
aLinkedList- list of valuesaDataType-i-- Gibt zurück:
- the average
-
SUM
Calculates the sum of a list of values- Parameter:
aLinkedList- list of valuesaDataType-i-- Gibt zurück:
- the sum
-
COUNT
- Parameter:
aLinkedList-aDataType-aI-- Gibt zurück:
-
ADD
public static Double[] ADD(Double[] aFirstObjectToCalculateWith, Double[] aSecondObjectToCalculateWith) Calculates the sum of a list of values- Parameter:
aFirstObjectToCalculateWith-aSecondObjectToCalculateWith- two values to sum up- Gibt zurück:
- the sum
-
ADD
public static Integer[] ADD(Integer[] aFirstObjectToCalculateWith, Integer[] aSecondObjectToCalculateWith) Calculates the sum of a list of values- Parameter:
aFirstObjectToCalculateWith-aSecondObjectToCalculateWith- two values to sum up- Gibt zurück:
- the sum
-
MULTIPLY
public static Double[] MULTIPLY(Double[] aFirstObjectToCalculateWith, Object aSecondObjectToCalculateWith) Calculates the product of a list of values- Parameter:
aFirstObjectToCalculateWith-aSecondObjectToCalculateWith- two values to multiply- Gibt zurück:
- the sum
-
MULTIPLY
public static Integer[] MULTIPLY(Integer[] aFirstObjectToCalculateWith, Object aSecondObjectToCalculateWith) Calculates the product of a list of values- Parameter:
aFirstObjectToCalculateWith-aSecondObjectToCalculateWith- two values to multiply- Gibt zurück:
- the sum
-
GaussIntegrationWeight
public static double GaussIntegrationWeight(int n, int i) Returns the weights for Gauß-Legendre-Integration- Parameter:
n- degree of polynomiali- number of weight- Gibt zurück:
- weight
-
GaussIntegrationX
public static double GaussIntegrationX(int n, int i) Returns the locations (x-values) for Gauß-Legendre-Integration- Parameter:
n- degree of polynomiali- number of location- Gibt zurück:
- x-value
-
calulateLinearRegression
public static void calulateLinearRegression(int ind, double[] x, double[] y, FWSimVariable<Double> aRegressionM, FWSimVariable<Double> aRegressionB) Calculates linear regression- Parameter:
ind- length of vectorx- vector with x-valuesy- vector with y-valuesaRegressionM- stores the calculated m (slope)aRegressionB- stores the calculated b
-