Class GradientDescentRootFinder


  • public class GradientDescentRootFinder
    extends OptimizationRootFinder
    Implements the gradient descent method to find zeros of a (multi-dimensional) function.
    Author:
    Matthias Thimm
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double precision
      The precision of the approximation.
    • Constructor Summary

      Constructors 
      Constructor Description
      GradientDescentRootFinder()
      Creates a new root finder for the given starting point and the given (multi-dimensional) function
    • Method Summary

      Modifier and Type Method Description
      java.util.Map<Variable,​Term> randomRoot​(java.util.List<Term> functions, java.util.Map<Variable,​Term> startingPoint)
      Determines the values for the variables appearing in the function such the function evaluates to zero.
      • Methods inherited from class java.lang.Object

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

      • precision

        public double precision
        The precision of the approximation. The actual used precision depends on the number of variables.
    • Constructor Detail

      • GradientDescentRootFinder

        public GradientDescentRootFinder()
        Creates a new root finder for the given starting point and the given (multi-dimensional) function
    • Method Detail

      • randomRoot

        public java.util.Map<Variable,​Term> randomRoot​(java.util.List<Term> functions,
                                                             java.util.Map<Variable,​Term> startingPoint)
                                                      throws GeneralMathException
        Description copied from class: RootFinder
        Determines the values for the variables appearing in the function such the function evaluates to zero.
        Specified by:
        randomRoot in class OptimizationRootFinder
        Parameters:
        functions - the functions
        startingPoint - the starting point for the search
        Returns:
        a map from variables to terms such that "function" evaluates to zero.
        Throws:
        GeneralMathException - if something went wrong.