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

## de.jstacs.algorithms.optimization
Class DifferentiableFunction

    java.lang.Object
      de.jstacs.algorithms.optimization.DifferentiableFunction

All Implemented Interfaces:
  Function

Direct Known Subclasses:
  LogPrior, NegativeDifferentiableFunction, NumericalDifferentiableFunction, OptimizableFunction

    public abstract class DifferentiableFunction

extends Object
implements Function

This class is the framework for any (at least) one time differentiable function `f: R^n -> R`.

Author:
  Jens Keilwagen

Constructor Summary
`DifferentiableFunction()`

Method Summary
`abstract double[]` | `evaluateGradientOfFunction(double[] x)` Evaluates the gradient of a function at a certain vector (in mathematical sense) `x`.
`protected double[]` | `findOneDimensionalMin(double[] current, double[] d, double alpha_0, double fAlpha_0, double linEps, double startDistance)` This method is used to find an approximation of an one-dimensional subfunction.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface de.jstacs.algorithms.optimization.Function
`evaluateFunction, getDimensionOfScope`

Constructor Detail

### DifferentiableFunction

    public DifferentiableFunction()

Method Detail

### evaluateGradientOfFunction

    public abstract double[] evaluateGradientOfFunction(double[] x)
                                                 throws DimensionException,
                                                        EvaluationException

  Evaluates the gradient of a function at a certain vector (in mathematical sense) `x`.

  Parameters:
    `x` - the current vector
  Returns:
    the evaluation of the gradient of a function, has dimension `Function.getDimensionOfScope()`
  Throws:
    `DimensionException` - if `dim(x) != n`, with `f: R^n -> R`
    `EvaluationException` - if there was something wrong during the evaluation of the gradient
  See Also:
    `Function.getDimensionOfScope()`

### findOneDimensionalMin

    protected double[] findOneDimensionalMin(double[] current,
                                             double[] d,
                                             double alpha_0,
                                             double fAlpha_0,
                                             double linEps,
                                             double startDistance)
                                      throws DimensionException,
                                             EvaluationException

  This method is used to find an approximation of an one-dimensional subfunction. That means it will find an approximation of the minimum starting at point `current` and search in direction `d`.
  `\argmin_{alpha >= 0} f(current + alpha*d)`
  This method is a standard implementation. You are enabled to overwrite this method to be faster if you know anything about the problem or if you just want to test other line search methods.

  Parameters:
    `current` - the start point
    `d` - the search direction
    `alpha_0` - the initial alpha
    `fAlpha_0` - the initial function value (this value is known in most cases and does not have to be computed again)
    `linEps` - the tolerance for stopping this method
    `startDistance` - the initial distance for bracketing the minimum
  Returns:
    `double[2] res = { alpha*, f(alpha*) }`
  Throws:
    `DimensionException` - if there is something wrong with the dimension
    `EvaluationException` - if there was something wrong during the evaluation of the function
  See Also:
    `OneDimensionalFunction.findMin(double, double, double, double)`

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