Class NonLinearConjugateGradientOptimizer

  • All Implemented Interfaces:
    DifferentiableMultivariateRealOptimizer

    public class NonLinearConjugateGradientOptimizer
    extends AbstractScalarDifferentiableOptimizer
    Non-linear conjugate gradient optimizer.

    This class supports both the Fletcher-Reeves and the Polak-Ribière update formulas for the conjugate search directions. It also supports optional preconditioning.

    Since:
    2.0
    • Method Detail

      • setPreconditioner

        public void setPreconditioner​(Preconditioner preconditioner)
        Set the preconditioner.
        Parameters:
        preconditioner - preconditioner to use for next optimization, may be null to remove an already registered preconditioner
      • setLineSearchSolver

        public void setLineSearchSolver​(UnivariateRealSolver lineSearchSolver)
        Set the solver to use during line search.
        Parameters:
        lineSearchSolver - solver to use during line search, may be null to remove an already registered solver and fall back to the default Brent solver.
      • setInitialStep

        public void setInitialStep​(double initialStep)
        Set the initial step used to bracket the optimum in line search.

        The initial step is a factor with respect to the search direction, which itself is roughly related to the gradient of the function

        Parameters:
        initialStep - initial step used to bracket the optimum in line search, if a non-positive value is used, the initial step is reset to its default value of 1.0