Class RootEstimator

java.lang.Object
com.irurueta.numerical.roots.RootEstimator
Direct Known Subclasses:
PolynomialRootsEstimator, SingleRootEstimator

public abstract class RootEstimator extends Object
Abstract class to find roots of functions. A root is the locus of points (set of points) where the value of a given function equals to zero. Usually root estimators will only find a single root around an initial coarsely estimated solution.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
    Boolean indicating that this instance is locked because it is doing computations.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Estimates the root or roots for a given function.
    boolean
    Returns boolean indicating whether this instance is locked.
    boolean
    Returns boolean indicating whether enough parameters have been provided in order to start the estimation of the roots of a function.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • locked

      protected boolean locked
      Boolean indicating that this instance is locked because it is doing computations. Attempting to change any parameters while being locked will raise a LockedException.
  • Constructor Details

    • RootEstimator

      protected RootEstimator()
      Constructor.
  • Method Details

    • isLocked

      public boolean isLocked()
      Returns boolean indicating whether this instance is locked. An instance is locked while it is doing computations. Attempting to change any parameters while being locked will raise a LockedException.
      Returns:
      Boolean indicating whether this instance is locked.
    • estimate

      Estimates the root or roots for a given function.
      Throws:
      LockedException - Exception raised if this instance is already locked.
      NotReadyException - Exception raised if not enough parameters have been provided in order to start the estimation.
      RootEstimationException - Raised if the root estimation failed for some other reason (usually inability to evaluate the function, numerical instability or convergence problems, or no roots are found).
    • isReady

      public boolean isReady()
      Returns boolean indicating whether enough parameters have been provided in order to start the estimation of the roots of a function.
      Returns:
      True if this instance is ready to start the root estimation, false otherwise.