Package methods
Class ConjugateGradientMethod
java.lang.Object
methods.AbstractGradientMethod
methods.ConjugateGradientMethod
- All Implemented Interfaces:
Method
public class ConjugateGradientMethod extends AbstractGradientMethod
Class of ConjugateGradient realisation
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ConjugateGradientMethod(double epsilon)Standard constructorConjugateGradientMethod(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_0private double[]startIteration(Function function, double[] prevX)Iterative method of ConjugateGradient.
-
Constructor Details
-
ConjugateGradientMethod
public ConjugateGradientMethod(double epsilon)Standard constructor- Parameters:
epsilon-AbstractGradientMethod.epsilon- See Also:
AbstractGradientMethod(double)
-
ConjugateGradientMethod
public ConjugateGradientMethod(double epsilon, boolean log, java.lang.String fileName) throws java.io.FileNotFoundExceptionFull constructor- Parameters:
epsilon-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)
-
-
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
-
startIteration
Iterative method of ConjugateGradient.- Parameters:
function- explored fucntionprevX- point of start for current iterative launch- Returns:
- temporary result of minimum
- Throws:
java.io.IOException- exception fromAbstractGradientMethod.log(double[], double[])
-