Class Calculable

java.lang.Object
com.dkt.graphics.extras.formula.AbstractCalculable
com.dkt.graphics.extras.formula.Calculable

public abstract class Calculable extends AbstractCalculable
This class is used within GFormula representing ℝ → ℝ functions
Author:
Federico Vera <[email protected]>
  • Constructor Details

    • Calculable

      public Calculable()
  • Method Details

    • 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 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 a DomainException if x is not part of the domain of the function