public class HessianGradientDescent extends Solver
Modifier and Type | Field and Description |
---|---|
private org.slf4j.Logger |
log
Logger.
|
private static double |
PRECISION |
private java.util.Map<Variable,Term> |
startingPoint
The starting point for the solver.
|
Constructor and Description |
---|
HessianGradientDescent(java.util.Map<Variable,Term> startingPoint) |
Modifier and Type | Method and Description |
---|---|
private double[] |
bestGuess(double[] currentGuess,
double[] dir,
java.util.List<Term> gradient,
java.util.List<Variable> variables)
Find the best guess.
|
private double[] |
getDirection(double[][] approxHessian,
double[] evaluatedGradient)
Find the best direction.
|
static boolean |
isInstalled() |
java.util.Map<Variable,Term> |
solve(ConstraintSatisfactionProblem problem)
Computes a solution to the given constraint satisfaction or optimization problem, i.e.
|
getDefaultGeneralSolver, getDefaultIntegerLinearSolver, getDefaultLinearSolver, hasDefaultGeneralSolver, hasDefaultIntegerLinearSolver, hasDefaultLinearSolver, setDefaultGeneralSolver, setDefaultIntegerLinearSolver, setDefaultLinearSolver
private org.slf4j.Logger log
private static final double PRECISION
public java.util.Map<Variable,Term> solve(ConstraintSatisfactionProblem problem) throws GeneralMathException
Solver
solve
in class Solver
problem
- the actual problemGeneralMathException
- if something went wrong.private double[] bestGuess(double[] currentGuess, double[] dir, java.util.List<Term> gradient, java.util.List<Variable> variables)
currentGuess
- gradient
- private double[] getDirection(double[][] approxHessian, double[] evaluatedGradient)
approxHessian
- evaluatedGradient
- public static boolean isInstalled() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException