de.jstacs.algorithms.optimization
Class OneDimensionalSubFunction

java.lang.Object
  extended by de.jstacs.algorithms.optimization.OneDimensionalFunction
      extended by de.jstacs.algorithms.optimization.OneDimensionalSubFunction
All Implemented Interfaces:
Function

public class OneDimensionalSubFunction
extends OneDimensionalFunction

This class used to do the line search.

Author:
Jens Keilwagen

Constructor Summary
OneDimensionalSubFunction(Function f, double[] current, double[] d)
           
 
Method Summary
 double evaluateFunction(double x)
          Evaluates the function at position x.
 
Methods inherited from class de.jstacs.algorithms.optimization.OneDimensionalFunction
evaluateFunction, findMin, getDimensionOfScope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneDimensionalSubFunction

public OneDimensionalSubFunction(Function f,
                                 double[] current,
                                 double[] d)
                          throws DimensionException
Parameters:
f - the high dimensional function
current - the curent vector
d - the direction along which the line search will be performed
Throws:
DimensionException
Method Detail

evaluateFunction

public double evaluateFunction(double x)
                        throws EvaluationException
Description copied from class: OneDimensionalFunction
Evaluates the function at position x.

Specified by:
evaluateFunction in class OneDimensionalFunction
Parameters:
x - the current position
Returns:
f(x)
Throws:
EvaluationException - if there was a mistake in evaluating the function