Package org.oristool.math.expression
Class ExponentialTerm
java.lang.Object
org.oristool.math.expression.ExponentialTerm
- All Implemented Interfaces:
AtomicTerm
An atomic term of the form
exp(-lambda * x).-
Constructor Summary
ConstructorsConstructorDescriptionExponentialTerm(Variable variable, BigDecimal lambda) Builds an instance for a given variable and rate. -
Method Summary
Modifier and TypeMethodDescriptionDuplicates an atomic term.booleanevaluate(OmegaBigDecimal value) Evaluates the atomic term substituting value to its variable.Returns the variable associated with the atomic term.inthashCode()booleanisOne()Checks if this term the constant 1.voidmultiply(AtomicTerm term) Multiplies with another term.voidsetLambda(BigDecimal lambda) voidsetVariable(Variable variable) voidsubstitute(Variable oldVar, Variable newVar) Substitutes oldVar with newVar in the atomic term.toString()
-
Constructor Details
-
ExponentialTerm
Builds an instance for a given variable and rate.- Parameters:
variable- variable of the exponential termlambda- rate (before the negation)
-
-
Method Details
-
getVariable
Description copied from interface:AtomicTermReturns the variable associated with the atomic term.- Specified by:
getVariablein interfaceAtomicTerm- Returns:
- the associated variable
-
setVariable
-
getLambda
-
setLambda
-
multiply
Description copied from interface:AtomicTermMultiplies with another term.- Specified by:
multiplyin interfaceAtomicTerm- Parameters:
term- to be multiplied
-
duplicate
Description copied from interface:AtomicTermDuplicates an atomic term.- Specified by:
duplicatein interfaceAtomicTerm- Returns:
- a copy of this term
-
isOne
public boolean isOne()Description copied from interface:AtomicTermChecks if this term the constant 1.- Specified by:
isOnein interfaceAtomicTerm- Returns:
- true if the term is one, false otherwise
-
evaluate
Description copied from interface:AtomicTermEvaluates the atomic term substituting value to its variable.- Specified by:
evaluatein interfaceAtomicTerm- Parameters:
value- the value to be substituted tox- Returns:
- the result of the evaluation
-
substitute
Description copied from interface:AtomicTermSubstitutes oldVar with newVar in the atomic term.- Specified by:
substitutein interfaceAtomicTerm- Parameters:
oldVar- variable to be substitutednewVar- new variable
-
equals
-
hashCode
public int hashCode() -
toString
-