Class FunctionExpression<T extends Ring<T>>
java.lang.Object
org.episteme.core.mathematics.symbolic.FunctionExpression<T>
- All Implemented Interfaces:
Expression<T>
Represents a transcendental function as a symbolic expression.
Supports sin, cos, tan, exp, log, sqrt, and power functions. Differentiation is not yet fully implemented (requires division operation).
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of supported function types. -
Method Summary
Modifier and TypeMethodDescriptionadd(Expression<T> other) Adds this expression to another.compose(Variable<T> variable, Expression<T> substitution) Composes this expression by substituting a variable with another expression.static <T extends Ring<T>>
FunctionExpression<T> cos(Expression<T> arg) Creates a cosine function expression.differentiate(Variable<T> variable) Differentiates this expression with respect to the given variable.divide(Expression<T> other) Divides this expression by another.Evaluates this expression with the given variable assignments.static <T extends Ring<T>>
FunctionExpression<T> exp(Expression<T> arg) Creates an exponential function expression.getRing()Returns the ring this expression belongs to.getType()Integrates this expression with respect to the given variable.static <T extends Ring<T>>
FunctionExpression<T> log(Expression<T> arg) Creates a natural logarithm function expression.multiply(Expression<T> other) Multiplies this expression by another.negate()Negates this expression.static <T extends Ring<T>>
FunctionExpression<T> pow(Expression<T> base, Expression<T> exp) Creates a power function expression.simplify()Simplifies this expression using algebraic rules.static <T extends Ring<T>>
FunctionExpression<T> sin(Expression<T> arg) Creates a sine function expression.static <T extends Ring<T>>
FunctionExpression<T> sqrt(Expression<T> arg) Creates a square root function expression.subtract(Expression<T> other) Subtracts another expression from this.static <T extends Ring<T>>
FunctionExpression<T> tan(Expression<T> arg) Creates a tangent function expression.toLatex()Converts this expression to LaTeX format.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Expression
pow
-
Method Details
-
sin
Creates a sine function expression. -
cos
Creates a cosine function expression. -
tan
Creates a tangent function expression. -
exp
Creates an exponential function expression. -
log
Creates a natural logarithm function expression. -
sqrt
Creates a square root function expression. -
pow
Creates a power function expression. -
add
Description copied from interface:ExpressionAdds this expression to another.- Specified by:
addin interfaceExpression<T extends Ring<T>>- Parameters:
other- the other expression- Returns:
- the sum expression
-
multiply
Description copied from interface:ExpressionMultiplies this expression by another.- Specified by:
multiplyin interfaceExpression<T extends Ring<T>>- Parameters:
other- the other expression- Returns:
- the product expression
-
subtract
Description copied from interface:ExpressionSubtracts another expression from this.- Specified by:
subtractin interfaceExpression<T extends Ring<T>>- Parameters:
other- the subtrahend- Returns:
- the difference expression
-
negate
Description copied from interface:ExpressionNegates this expression.- Specified by:
negatein interfaceExpression<T extends Ring<T>>- Returns:
- the negated expression
-
divide
Description copied from interface:ExpressionDivides this expression by another.- Specified by:
dividein interfaceExpression<T extends Ring<T>>- Parameters:
other- the divisor- Returns:
- the quotient expression
-
getRing
Description copied from interface:ExpressionReturns the ring this expression belongs to.- Specified by:
getRingin interfaceExpression<T extends Ring<T>>- Returns:
- the ring
-
differentiate
Description copied from interface:ExpressionDifferentiates this expression with respect to the given variable.- Specified by:
differentiatein interfaceExpression<T extends Ring<T>>- Parameters:
variable- the variable to differentiate by- Returns:
- the derivative expression
-
integrate
Description copied from interface:ExpressionIntegrates this expression with respect to the given variable.- Specified by:
integratein interfaceExpression<T extends Ring<T>>- Parameters:
variable- the variable to integrate by- Returns:
- the integral expression
-
compose
Description copied from interface:ExpressionComposes this expression by substituting a variable with another expression.- Specified by:
composein interfaceExpression<T extends Ring<T>>- Parameters:
variable- the variable to substitutesubstitution- the expression to substitute with- Returns:
- the composed expression
-
simplify
Description copied from interface:ExpressionSimplifies this expression using algebraic rules.- Specified by:
simplifyin interfaceExpression<T extends Ring<T>>- Returns:
- the simplified expression
-
toLatex
Description copied from interface:ExpressionConverts this expression to LaTeX format.- Specified by:
toLatexin interfaceExpression<T extends Ring<T>>- Returns:
- the LaTeX string
-
evaluate
Description copied from interface:ExpressionEvaluates this expression with the given variable assignments.- Specified by:
evaluatein interfaceExpression<T extends Ring<T>>- Parameters:
assignments- the variable assignments- Returns:
- the evaluated value
-
toString
-
getType
-
getArgument
-
getExponent
-