Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math.optimization.general
Interface Preconditioner

    public interface Preconditioner

This interface represents a preconditioner for differentiable scalar objective function optimizers.

Since:
  2.0
Version:
  $Revision: 1073158 $ $Date: 2011-02-21 22:46:52 +0100 (lun. 21 fÃ©vr. 2011) $

Method Summary
`double[]` | `precondition(double[] point, double[] r)` Precondition a search direction.

Method Detail

### precondition

    double[] precondition(double[] point,
                          double[] r)
                          throws FunctionEvaluationException,
                                 IllegalArgumentException

  Precondition a search direction.

  The returned preconditioned search direction must be computed fast or the algorithm performances will drop drastically. A classical approach is to compute only the diagonal elements of the hessian and to divide the raw search direction by these elements if they are all positive. If at least one of them is negative, it is safer to return a clone of the raw search direction as if the hessian was the identity matrix. The rationale for this simplified choice is that a negative diagonal element means the current point is far from the optimum and preconditioning will not be efficient anyway in this case.

  Parameters:
    `point` - current point at which the search direction was computed
    `r` - raw search direction (i.e. opposite of the gradient)
  Returns:
    approximation of H-1r where H is the objective function hessian
  Throws:
    `FunctionEvaluationException` - if no cost can be computed for the parameters
    `IllegalArgumentException` - if point dimension is wrong

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.