Class SumExpression<T extends Ring<T>>
java.lang.Object
org.episteme.core.mathematics.symbolic.SumExpression<T>
- All Implemented Interfaces:
Expression<T>
Represents a sum of two expressions.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
ConstructorsConstructorDescriptionSumExpression(Expression<T> left, Expression<T> right, Ring<T> ring) Creates a sum expression. -
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.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.getLeft()Returns the left operand.getRight()Returns the right operand.getRing()Returns the ring structure.Integrates this expression with respect to the given variable.multiply(Expression<T> other) Multiplies this expression by another.negate()Negates this expression.simplify()Simplifies this expression using algebraic rules.subtract(Expression<T> other) Subtracts another expression from this.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
-
Constructor Details
-
SumExpression
Creates a sum expression.- Parameters:
left- the left operandright- the right operandring- the ring structure
-
-
Method Details
-
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
-
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
-
getLeft
-
getRight
-
getRing
-
toString
-