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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGradientDescent(Map<Variable, Term> startingPoint) Creates a new gradient descent solver -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanreturn if solver is installedsolve(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
-
-
Method Details
-
solve
public Map<Variable,Term> solve(GeneralConstraintSatisfactionProblem constraintSatisfactionProblem) throws GeneralMathException Description copied from class:SolverComputes a solution to the given constraint satisfaction or optimization problem, i.e. a mapping from variables of the problem to terms.- Specified by:
solvein classSolver- Parameters:
constraintSatisfactionProblem- the actual problem- Returns:
- a mapping from variables of the problem to terms.
- Throws:
GeneralMathException- if something went wrong.
-
isInstalled
return if solver is installed- Returns:
- if solver is installed
- Throws:
UnsupportedOperationException- UnsupportedOperationException
-