Class Derivative
java.lang.Object
math.differentialcalculus.Derivative
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
The base variable that the top level expression is to be differentiated with respect to. -
Constructor Summary
ConstructorsConstructorDescriptionDerivative
(String expression) Accepted format...diff(expr);or diff(diffName)...where diffName is the name of a stored Differentiable. -
Method Summary
Modifier and TypeMethodDescriptionDifferentiates the expression.Differentiates the expression.static String
getMathExpr
(String expression) boolean
isBaseVariable
(String name) static void
-
Field Details
-
builder
-
baseVariable
The base variable that the top level expression is to be differentiated with respect to.
-
-
Constructor Details
-
Derivative
-
-
Method Details
-
getMathExpr
-
translateToBaseTerms
- Parameters:
d
- The Differentiable item- Returns:
- an ArrayList containing this object's data in terms of the base variable.
-
translateToBaseTerms_1
- Returns:
- an ArrayList containing this object's data in terms of the base variable.
-
differentiate
Differentiates the expression.- Returns:
- the derivative as a string of characters.
-
differentiateAsList
-
isBaseVariable
- Parameters:
name
- The name to check.- Returns:
- true if the name is automatically generated and so, most likely refers to a stored Differentiable.
-
eval
- Parameters:
expr
- The expression to differentiate. It must have the form: diff(@(x)sin(x),2) or diff(@(x)sin(x),2,3) If the diff(@(x)sin(x),2) form is specified, then the function is differentiated 2 times and the result is returned. If the diff(@(x)sin(x),2,3) form is specified, then the function is differentiated 3 times and the result is evaluated at x = 2 and then the value is returned.
-
main
- Parameters:
args
-
-