public class MathStat
extends java.lang.Object
| Constructor and Description |
|---|
MathStat() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
abs(java.lang.String valueType,
java.lang.Object value)
Get the absolute value of the value passed in.
|
static java.lang.Object |
cos(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
int numTerms)
Use the Taylor series to approximate the Cosine angle of x.
|
static java.lang.Object |
exp(int power)
Calculate the value of
e raised to the power of power. |
static java.lang.Double |
logBaseTwo(java.lang.Double logValue,
EvaluateMathDef eval)
Calculate the 'log to the base 2' value.
|
static java.lang.Object |
mean(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
Calculate the sum average value of the list of elements.
|
static java.lang.Object |
median(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
Calculate the middle value of the list of elements.
|
static java.lang.Object |
numEquiv(java.lang.String valueType,
double numerical)
Get the equivalent of the double numerical value for the data type.
|
static java.lang.Object |
numEquiv(java.lang.String valueType,
long numerical)
Get the equivalent of the long numerical value for the data type.
|
static java.lang.Object |
pow(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
int power)
Calculate the value raised to the power of power.
|
static java.lang.Object |
powFrac(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
double fraction)
Calculate the power of the value to a fraction.
|
static java.lang.Object |
rtNum(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
int rootNumber)
Calculate the root of the value for a number larger than 2.
|
static java.lang.Object |
sd(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
Calculate the standard deviation value of the list of elements.
|
static java.lang.Object |
sin(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
int numTerms)
Use the Taylor series to approximate the Sine angle of x.
|
static java.lang.Object |
sqr(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value)
Calculate the square of the value.
|
static java.lang.Object |
sqrt(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value)
Calculate the square root of the value.
|
static java.lang.Object |
sum(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
Calculate the sum total value of the list of elements.
|
static java.lang.Object |
var(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
Calculate the variance value of the list of elements.
|
public static java.lang.Object abs(java.lang.String valueType,
java.lang.Object value)
throws java.lang.Exception
valueType - the type of the value.value - the value.java.lang.Exception - any error.public static java.lang.Object sqr(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.value - the array of values.java.lang.Exception - any error.public static java.lang.Object pow(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
int power)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.value - the value to raise to the power.power - the power to raise the value to. Must be a positive integer.java.lang.Exception - any error.public static java.lang.Object powFrac(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
double fraction)
throws java.lang.Exception
rtNum with a root value of (1.0 / denominator).valueType - the object type being evaluated.eval - the evaluation function.value - the array of values.fraction - the number fraction specified as 1.0 / denominator,
so the fraction of a half or (1/2) is entered as the value 0.5, for example.
This should be convertible back into a whole integer number again, as that is what
gets passed to rtNum to calculate the fraction power value.value^fraction.java.lang.Exception - any error.public static java.lang.Object exp(int power)
e raised to the power of power. This
is a rough approximation method that does work more quickly than Math.exp,
but not nearly as accurate. Copied from http://www.javamex.com/tutorials/math/exp.shtml.power - the power to raise the value e to. Must be a positive integer.Double value only.public static java.lang.Object sqrt(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.value - the array of values.java.lang.Exception - any error.public static java.lang.Object rtNum(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
int rootNumber)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.value - the array of values.rootNumber - the root to find the source to. 3 indicates a cube root, and so on.java.lang.Exception - any error.public static java.lang.Double logBaseTwo(java.lang.Double logValue,
EvaluateMathDef eval)
throws java.lang.Exception
logValue - the value as a java object.eval - the evaluation function.java.lang.Exception - any error.public static java.lang.Object sum(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.valueList - the array of values.java.lang.Exception - any error.public static java.lang.Object mean(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.valueList - the array of values.java.lang.Exception - any error.public static java.lang.Object median(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.valueList - the array of values.java.lang.Exception - any error.public static java.lang.Object var(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.valueList - the array of values.java.lang.Exception - any error.public static java.lang.Object sd(java.lang.String valueType,
EvaluateMathDef eval,
java.util.ArrayList<?> valueList)
throws java.lang.Exception
valueType - the object type being evaluated.eval - the evaluation function.valueList - the array of values.java.lang.Exception - any error.public static java.lang.Object numEquiv(java.lang.String valueType,
long numerical)
throws java.lang.Exception
valueType - the type of the value.numerical - an integer numerical value.java.lang.Exception - any error.public static java.lang.Object numEquiv(java.lang.String valueType,
double numerical)
throws java.lang.Exception
valueType - the type of the value.numerical - an integer numerical value.java.lang.Exception - any error.public static java.lang.Object sin(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
int numTerms)
throws java.lang.Exception
Math.sin.valueType - the object type being evaluated.eval - the evaluation function.value - the value to convert.numTerms - the number of Taylor terms to evaluate.java.lang.Exception - any error.public static java.lang.Object cos(java.lang.String valueType,
EvaluateMathDef eval,
java.lang.Object value,
int numTerms)
throws java.lang.Exception
Math.sin.valueType - the object type being evaluated.eval - the evaluation function.value - the value to convert.numTerms - the number of Taylor terms to evaluate.java.lang.Exception - any error.