Class GradientDescent


  • public class GradientDescent
    extends Solver
    This class implements the gradient descent method to find an optimum.
    Author:
    Matthias Thimm
    • Field Detail

      • precision

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

      • GradientDescent

        public GradientDescent​(java.util.Map<Variable,​Term> startingPoint)
        Creates a new gradient descent solver
        Parameters:
        startingPoint - the starting point
    • Method Detail

      • solve

        public java.util.Map<Variable,​Term> solve​(ConstraintSatisfactionProblem constraintSatisfactionProblem)
                                                 throws GeneralMathException
        Description copied from class: Solver
        Computes a solution to the given constraint satisfaction or optimization problem, i.e. a mapping from variables of the problem to terms.
        Specified by:
        solve in class Solver
        Parameters:
        constraintSatisfactionProblem - the actual problem
        Returns:
        a mapping from variables of the problem to terms.
        Throws:
        GeneralMathException - if something went wrong.
      • isInstalled

        public static boolean isInstalled()
                                   throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException