public class MathUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Double[][] |
rom |
Constructor and Description |
---|
MathUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
arcLength(java.lang.String f,
java.lang.String v,
java.lang.String a,
java.lang.String b) |
static java.lang.String |
evaluate(java.lang.String codeString,
IAST function) |
static java.lang.String |
evaluate(java.lang.String codeString,
java.lang.String function) |
static java.lang.String |
getDerivative(java.lang.String fun,
java.lang.String[] var,
java.lang.String resp) |
static double |
getFunctionVal(java.lang.String f,
double s) |
static java.lang.String |
getFunctionVal(java.lang.String fun,
java.lang.String[] var,
java.lang.String resp,
java.lang.String[] vals) |
static double |
getFunctionVal(java.lang.String f,
java.lang.String v,
java.lang.String x) |
static java.lang.String |
getPowerSeries(java.lang.String fun,
java.lang.String v,
java.lang.String cen,
int iter) |
static double |
integrate(java.lang.String fun,
java.lang.String v,
java.lang.String aS,
java.lang.String bS)
Integrate a function numerically with the LegendreGauss method.
|
static double |
integrate(java.lang.String fun,
java.lang.String v1,
java.lang.String v2,
java.lang.String[] bounds)
TODO use LegendreGauss method
|
static double |
integrate(java.lang.String method,
java.lang.String fun,
java.lang.String v,
java.lang.String aS,
java.lang.String bS)
Integrate a function numerically.
|
static boolean[] |
isValid(java.lang.String[] fun,
java.lang.String[] var) |
static boolean |
isValid(java.lang.String fun,
java.lang.String[] var) |
static IExpr |
parse(java.lang.String evalStr,
IAST function)
Parse the
codeString into an IExpr and if
function unequals null , replace all occurences
of symbol x in the function with the parsed expression. |
static double |
surfaceArea(java.lang.String fun,
java.lang.String v1,
java.lang.String v2,
java.lang.String[] bounds) |
static java.lang.String |
tangentLine(java.lang.String f,
java.lang.String x,
java.lang.String v) |
public static double arcLength(java.lang.String f, java.lang.String v, java.lang.String a, java.lang.String b) throws MathException
MathException
public static double integrate(java.lang.String fun, java.lang.String v, java.lang.String aS, java.lang.String bS) throws MathException
fun
- the function which should be integratedv
- the variableaS
- lower bound double value string for integrationbS
- upper bound double value string for integrationMathException
public static double integrate(java.lang.String method, java.lang.String fun, java.lang.String v, java.lang.String aS, java.lang.String bS) throws MathException
method
- the following methods are possible: LegendreGauss, Simpson,
Romberg, Trapezoidfun
- the function which should be integratedv
- the variableaS
- lower bound double value string for integrationbS
- upper bound double value string for integrationMathException
public static double integrate(java.lang.String fun, java.lang.String v1, java.lang.String v2, java.lang.String[] bounds)
fun
- v1
- v2
- bounds
- public static double getFunctionVal(java.lang.String f, double s)
public static double getFunctionVal(java.lang.String f, java.lang.String v, java.lang.String x)
public static java.lang.String getFunctionVal(java.lang.String fun, java.lang.String[] var, java.lang.String resp, java.lang.String[] vals) throws MathException
MathException
public static boolean isValid(java.lang.String fun, java.lang.String[] var)
public static boolean[] isValid(java.lang.String[] fun, java.lang.String[] var)
public static java.lang.String getDerivative(java.lang.String fun, java.lang.String[] var, java.lang.String resp)
public static java.lang.String getPowerSeries(java.lang.String fun, java.lang.String v, java.lang.String cen, int iter) throws MathException
MathException
public static java.lang.String tangentLine(java.lang.String f, java.lang.String x, java.lang.String v) throws MathException
MathException
public static double surfaceArea(java.lang.String fun, java.lang.String v1, java.lang.String v2, java.lang.String[] bounds) throws MathException
MathException
public static java.lang.String evaluate(java.lang.String codeString, java.lang.String function)
public static java.lang.String evaluate(java.lang.String codeString, IAST function)