Package org.oristool.math.expression
Interface AtomicTerm
- All Known Implementing Classes:
ExponentialTerm
,MonomialTerm
public interface AtomicTerm
A generic atomic term (exponential or monomial).
-
Method Summary
Modifier and TypeMethodDescriptionDuplicates an atomic term.evaluate
(OmegaBigDecimal value) Evaluates the atomic term substituting value to its variable.Returns the variable associated with the atomic term.boolean
isOne()
Checks if this term the constant 1.void
multiply
(AtomicTerm term) Multiplies with another term.void
substitute
(Variable oldVar, Variable newVar) Substitutes oldVar with newVar in the atomic term.
-
Method Details
-
multiply
Multiplies with another term.- Parameters:
term
- to be multiplied
-
duplicate
AtomicTerm duplicate()Duplicates an atomic term.- Returns:
- a copy of this term
-
isOne
boolean isOne()Checks if this term the constant 1.- Returns:
- true if the term is one, false otherwise
-
evaluate
Evaluates the atomic term substituting value to its variable.- Parameters:
value
- the value to be substituted tox
- Returns:
- the result of the evaluation
-
substitute
Substitutes oldVar with newVar in the atomic term.- Parameters:
oldVar
- variable to be substitutednewVar
- new variable
-
getVariable
Variable getVariable()Returns the variable associated with the atomic term.- Returns:
- the associated variable
-