Class GradientDescent
java.lang.Object
org.tweetyproject.math.opt.solver.Solver
org.tweetyproject.math.opt.solver.GradientDescent
This class implements the gradient descent method to
find an optimum.
- Author:
- Matthias Thimm
-
Field Summary
-
Constructor Summary
ConstructorDescriptionGradientDescent
(Map<Variable, Term> startingPoint) Creates a new gradient descent solver -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
solve
(GeneralConstraintSatisfactionProblem constraintSatisfactionProblem) Computes a solution to the given constraint satisfaction or optimization problem, i.e.Methods inherited from class org.tweetyproject.math.opt.solver.Solver
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
-
Field Details
-
precision
public double precisionThe precision of the approximation. The actual used precision depends on the number of variables.
-
-
Constructor Details
-
GradientDescent
Creates a new gradient descent solver- Parameters:
startingPoint
- the starting point
-
-
Method Details
-
solve
public Map<Variable,Term> solve(GeneralConstraintSatisfactionProblem 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 classSolver
- Parameters:
constraintSatisfactionProblem
- the actual problem- Returns:
- a mapping from variables of the problem to terms.
- Throws:
GeneralMathException
- if something went wrong.
-
isInstalled
- Returns:
- if solver is installed
- Throws:
UnsupportedOperationException
- UnsupportedOperationException
-