net.simplace.core.service.MathHelper
public class MathHelper {
// Public Constructors
public MathHelper();
// Class Methods public static Number
MAX(LinkedList aLinkedList, int i);
Calculates the maximum of a list of values
- aLinkedList
list of values
- i
returns the maximum
public static Number
MIN(LinkedList aLinkedList, int i);
Calculates the minimum of a list of values
- aLinkedList
list of values
- i
returns the minimum
public static Number
AVG(LinkedList aLinkedList,
FWSimVariable.DATA_TYPE aDataType, int i);
Calculates the average of a list of values
- aLinkedList
list of values
- aDataType
- i
returns the average
public static Number
SUM(LinkedList aLinkedList,
FWSimVariable.DATA_TYPE aDataType, int i);
Calculates the sum of a list of values
- aLinkedList
list of values
- aDataType
- i
returns the sum
public static Integer
COUNT(LinkedList aLinkedList);
returns public static Double[]
ADD(Double[] aFirstObjectToCalculateWith, Double[]
aSecondObjectToCalculateWith);
Calculates the sum of a list of values
- aFirstObjectToCalculateWith
- aSecondObjectToCalculateWith
two values to sum up
returns the sum
public static Integer[]
ADD(Integer[] aFirstObjectToCalculateWith, Integer[]
aSecondObjectToCalculateWith);
Calculates the sum of a list of values
- aFirstObjectToCalculateWith
- aSecondObjectToCalculateWith
two values to sum up
returns the sum
public static Double[]
MULTIPLY(Double[] aFirstObjectToCalculateWith, Object
aSecondObjectToCalculateWith);
Calculates the product of a list of values
- aFirstObjectToCalculateWith
- aSecondObjectToCalculateWith
two values to multiply
returns the sum
public static Integer[]
MULTIPLY(Integer[] aFirstObjectToCalculateWith,
Object aSecondObjectToCalculateWith);
Calculates the product of a list of values
- aFirstObjectToCalculateWith
- aSecondObjectToCalculateWith
two values to multiply
returns the sum
public static double
GaussIntegrationWeight(int n, int i);
Returns the weights for Gau�-Legendre-Integration
- n
degree of polynomial
- i
number of weight
returns weight
public static double
GaussIntegrationX(int n, int i);
Returns the locations (x-values) for Gau�-Legendre-Integration
- n
degree of polynomial
- i
number of location
returns x-value
public static void
calulateLinearRegression(int ind, double[] x, double[] y,
FWSimVariable aRegressionM,
FWSimVariable aRegressionB);
Calculates linear regression
- ind
length of vector
- x
vector with x-values
- y
vector with y-values
- aRegressionM
stores the calculated m (slope)
- aRegressionB
stores the calculated b
}