Class ConstantExpression<T extends Ring<T>>
java.lang.Object
org.episteme.core.mathematics.symbolic.ConstantExpression<T>
- All Implemented Interfaces:
Expression<T>
Represents a constant value as a symbolic expression.
*
Reference:
Mohr, P. J., et al. (2016). CODATA Recommended Values of the Fundamental Physical Constants. Reviews of Modern Physics.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
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.booleanEvaluates this expression with the given variable assignments.getRing()Returns the ring structure.getValue()Returns the constant value.inthashCode()Integrates this expression with respect to the given variable.multiply(Expression<T> other) Multiplies this expression by another.negate()Negates this expression.static <E extends Ring<E>>
ConstantExpression<E> ofConstant(E value, Ring<E> ring) Returns a constant expression for the given value and ring.simplify()Simplifies this expression using algebraic rules.subtract(Expression<T> other) Subtracts another expression from this.toLatex()Converts this expression to LaTeX format.toString()static ConstantExpression<Real> valueOf(double value) Returns a constant expression for the given double value using Real numbers.Methods inherited from interface Expression
pow
-
Constructor Details
-
ConstantExpression
-
-
Method Details
-
valueOf
Returns a constant expression for the given double value using Real numbers.- Parameters:
value- the double value- Returns:
- the constant expression
-
ofConstant
Returns a constant expression for the given value and ring.- Type Parameters:
E- the type of the constant- Parameters:
value- the constant valuering- the ring structure- Returns:
- the constant 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
-
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
-
getValue
-
getRing
-
toString
-
equals
-
hashCode
-