Class RootFinder

  • Direct Known Subclasses:
    NewtonRootFinder, OptimizationRootFinder

    public abstract class RootFinder
    extends java.lang.Object
    Classes which extend this class represent algorithms for finding zero points (roots) of functions.
    Author:
    Matthias Thimm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<Term> functions
      The (multi-dimensional) function of this root finder.
      static double PRECISION
      The precision for finding roots.
      private java.util.Map<Variable,​Term> startingPoint
      The starting point of this root finder.
    • Constructor Summary

      Constructors 
      Constructor Description
      RootFinder​(java.util.List<Term> functions, java.util.Map<Variable,​Term> startingPoint)
      Creates a new root finder for the given starting point and the given (multi-dimensional) function
      RootFinder​(Term function)
      Creates a new root finder for the given function.
      RootFinder​(Term function, java.util.Map<Variable,​Term> startingPoint)
      Creates a new root finder for the given starting point and the given function
    • Method Summary

      Modifier and Type Method Description
      java.util.List<Term> getFunctions()
      Returns the function of this root finder.
      java.util.Map<Variable,​Term> getStartingPoint()
      Returns the starting point of this finder.
      abstract java.util.Map<Variable,​Term> randomRoot()
      Determines the values for the variables appearing in the function such the function evaluates to zero.
      void setStartingPoint​(java.util.Map<Variable,​Term> startingPoint)
      sets the starting point of this root finder.
      • Methods inherited from class java.lang.Object

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

      • PRECISION

        public static double PRECISION
        The precision for finding roots.
      • functions

        private java.util.List<Term> functions
        The (multi-dimensional) function of this root finder.
      • startingPoint

        private java.util.Map<Variable,​Term> startingPoint
        The starting point of this root finder.
    • Constructor Detail

      • RootFinder

        public RootFinder​(Term function)
        Creates a new root finder for the given function.
        Parameters:
        function - a term
      • RootFinder

        public RootFinder​(Term function,
                          java.util.Map<Variable,​Term> startingPoint)
        Creates a new root finder for the given starting point and the given function
        Parameters:
        function - a function
        startingPoint - the starting point
      • RootFinder

        public RootFinder​(java.util.List<Term> functions,
                          java.util.Map<Variable,​Term> startingPoint)
        Creates a new root finder for the given starting point and the given (multi-dimensional) function
        Parameters:
        functions - a list of functions
        startingPoint - the starting point
    • Method Detail

      • setStartingPoint

        public void setStartingPoint​(java.util.Map<Variable,​Term> startingPoint)
        sets the starting point of this root finder.
        Parameters:
        startingPoint - the starting point
      • getStartingPoint

        public java.util.Map<Variable,​Term> getStartingPoint()
        Returns the starting point of this finder.
        Returns:
        the starting point of this finder.
      • getFunctions

        public java.util.List<Term> getFunctions()
        Returns the function of this root finder.
        Returns:
        the function of this root finder.
      • randomRoot

        public abstract java.util.Map<Variable,​Term> randomRoot()
                                                               throws GeneralMathException
        Determines the values for the variables appearing in the function such the function evaluates to zero.
        Returns:
        a map from variables to terms such that "function" evaluates to zero.
        Throws:
        GeneralMathException - if something went wrong.