Package methods
Class GradientDescentMethod
java.lang.Object
methods.AbstractGradientMethod
methods.GradientDescentMethod
- All Implemented Interfaces:
Method
public class GradientDescentMethod extends AbstractGradientMethod
предоставляет возможность искать минимум квадратичных функций методом градиентного спуска
-
Field Summary
Fields Modifier and Type Field Description private doublestepstep of Gradient method -
Constructor Summary
Constructors Constructor Description GradientDescentMethod(double step, double epsilon)Standard constructorGradientDescentMethod(double step, double epsilon, boolean log, java.lang.String fileName)Full constructor -
Method Summary
Modifier and Type Method Description double[]findMinimum(Function function, double[] x0)search minimum of the function with start from the point in x_0
-
Field Details
-
step
private double stepstep of Gradient method
-
-
Constructor Details
-
GradientDescentMethod
public GradientDescentMethod(double step, double epsilon, boolean log, java.lang.String fileName) throws java.io.FileNotFoundExceptionFull constructor- Parameters:
step-stepepsilon-AbstractGradientMethod.epsilonlog-AbstractGradientMethod.logfileName- output file forAbstractGradientMethod.out- Throws:
java.io.FileNotFoundException- if specified output file was not found- See Also:
AbstractGradientMethod(double, boolean, String)
-
GradientDescentMethod
public GradientDescentMethod(double step, double epsilon)Standard constructor- Parameters:
step-stepepsilon-AbstractGradientMethod.epsilon- See Also:
AbstractGradientMethod(double)
-
-
Method Details
-
findMinimum
Description copied from interface:Methodsearch minimum of the function with start from the point in x_0- Parameters:
function- explores functionx0- point for the start of exploring- Returns:
- minimum of the function
- Throws:
java.io.IOException- exception when log from function computing throw exception
-