Package com.dkt.graphics.extras.formula
Class Calculable
java.lang.Object
com.dkt.graphics.extras.formula.AbstractCalculable
com.dkt.graphics.extras.formula.Calculable
This class is used within
GFormula
representing
ℝ → ℝ
functions- Author:
- Federico Vera <[email protected]>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract double
f
(double x) This method should f the function's value.
It's not strictly necessary, but the idea is for these functions to be deterministic since they are usually plotted as fixed elements on the canvasMethods inherited from class com.dkt.graphics.extras.formula.AbstractCalculable
endPoint, endPoint, getName, getScale, scaleX, scaleY, setName, setScale, setScaleX, setScaleY, startPoint, startPoint, step, step
-
Constructor Details
-
Calculable
public Calculable()
-
-
Method Details
-
f
This method should f the function's value.
It's not strictly necessary, but the idea is for these functions to be deterministic since they are usually plotted as fixed elements on the canvas- Parameters:
x
- the input argument- Returns:
f(x)
- Throws:
DomainException
- methods that implement this interface should throw aDomainException
ifx
is not part of the domain of the function
-