Class Calculable


  • public abstract class Calculable
    extends AbstractCalculable
    This class is used within GFormula representing \u211d \u2192 \u211d functions
    • Constructor Detail

      • Calculable

        public Calculable()
    • Method Detail

      • f

        public abstract double f​(double x)
                          throws DomainException
        This method should f the function's value.
        It's not strictly necessary, but the idea is for this 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 a DomainException if x is not part of the domain of the function