Class IPBisectionRootFinder

    • Field Detail

      • xNeg

        protected double xNeg
        Value at which the function's value is negative.
      • xPos

        protected double xPos
        Value at which the function's value is positive.
      • fNeg

        protected double fNeg
        The value of the function at xNeg
      • fPos

        protected double fPos
        The value of the function at xPos
      • myDesiredPrecision

        protected double myDesiredPrecision
        Desired precision.
    • Constructor Detail

      • IPBisectionRootFinder

        public IPBisectionRootFinder​(FunctionIfc func,
                                     Interval interval)
        Parameters:
        func -
        interval -
      • IPBisectionRootFinder

        public IPBisectionRootFinder​(FunctionIfc func,
                                     double lower,
                                     double upper)
        Parameters:
        func -
        lower -
        upper -
      • IPBisectionRootFinder

        public IPBisectionRootFinder​(FunctionIfc func,
                                     double initialPt,
                                     double lower,
                                     double upper)
        Parameters:
        func -
        lower -
        upper -
    • Method Detail

      • getXNeg

        public double getXNeg()
        Returns:
        the xNeg
      • getXPos

        public double getXPos()
        Returns:
        the xPos
      • getFNeg

        public double getFNeg()
        Returns:
        the fNeg
      • getFPos

        public double getFPos()
        Returns:
        the fPos
      • getPrecision

        public double getPrecision()
      • getDesiredPrecision

        public double getDesiredPrecision()
        Returns the desired precision.
      • setDesiredPrecision

        public void setDesiredPrecision​(double prec)
        Defines the desired precision.
      • hasNext

        protected boolean hasNext()
        Description copied from class: IterativeProcess
        This method should check to see if another step is necessary for the iterative process. True means that the process has another step to be executed. False, means that no more steps are available for execution.
        Specified by:
        hasNext in class IterativeProcess<RootFinderStep>
        Returns:
        true if another step is present
      • hasConverged

        public boolean hasConverged()
        Check to see if the result has been attained.
        Specified by:
        hasConverged in class IPRootFinder
        Returns:
        boolean
      • toString

        public java.lang.String toString()
        Description copied from class: IPRootFinder
        Returns a String representation of the finder
        Overrides:
        toString in class IPRootFinder
        Returns:
        A String with basic results
      • next

        protected RootFinderStep next()
        Description copied from class: IterativeProcess
        This method should return the next step to be executed in the iterative process or null if no more steps can be executed. It should advance the current step to the next step if it is available
        Specified by:
        next in class IterativeProcess<RootFinderStep>
        Returns:
        the type of the step
      • runStep

        protected void runStep()
        Description copied from class: IterativeProcess
        This method tells the iterative process to execute the current step. Typical usage is to call this after calling next() to advance to the next step. This method should throw a NoSuchStepException if there are no more steps to run and it is told to run the step.
        Specified by:
        runStep in class IterativeProcess<RootFinderStep>
      • main

        public static void main​(java.lang.String[] args)
        Parameters:
        args -