genopt.algorithm.util.linesearch
Class FibonacciDivision

java.lang.Object
  extended by genopt.algorithm.util.linesearch.IntervalDivider
      extended by genopt.algorithm.util.linesearch.FibonacciDivision

public class FibonacciDivision
extends IntervalDivider

Class for doing a line search using the Fibonacci division.

This project was carried out at:

and supported by

GenOpt Copyright (c) 1998-2011, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

Version:
GenOpt(R) 3.1.0 (December 8, 2011)

Author:
Michael Wetter

Field Summary
private  int[] fibo
          The Fibonacci numbers
 
Fields inherited from class genopt.algorithm.util.linesearch.IntervalDivider
dimF, dimX, dx, LS, nIntRed, nIntRedMax, NINTREDMAXDEF, opt, x0, x1, x2, x3, xLow, xMin, xUpp
 
Constructor Summary
FibonacciDivision(Optimizer opt)
          Constructor
 
Method Summary
static int[] getFibonacci(int N)
          Gets the Fibonacci numbers
protected  double getReductionFactor()
          Gets the reduction factor q = I(n+1)/I(n)
 void setAbsDFMin(double dFMinimal, int nMax)
          Set the minimal absolut difference between the lowest 3 function values as the stopping criteria
 void setMaxIntRed(int n)
          Sets the maximum number of interval reductions
 void setUncertaintyInterval(double dx)
          Sets the fraction of the desired uncertainty interval (0..1)
 
Methods inherited from class genopt.algorithm.util.linesearch.IntervalDivider
getXLower, getXMin, getXUpper, iterate, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fibo

private int[] fibo
The Fibonacci numbers

Constructor Detail

FibonacciDivision

public FibonacciDivision(Optimizer opt)
Constructor

Parameters:
opt - a reference to the Optimizer object
Method Detail

getReductionFactor

protected double getReductionFactor()
Gets the reduction factor q = I(n+1)/I(n)

Specified by:
getReductionFactor in class IntervalDivider
Returns:
the reduction factor q = I(n+1)/I(n)

getFibonacci

public static int[] getFibonacci(int N)
Gets the Fibonacci numbers

Parameters:
N - the number of elements in the Fibonacci serie
Returns:
an array containing the Fibonacci numbers

setUncertaintyInterval

public void setUncertaintyInterval(double dx)
Sets the fraction of the desired uncertainty interval (0..1)

Specified by:
setUncertaintyInterval in class IntervalDivider
Parameters:
dx - the normalized fraction of the uncertainty interval

setAbsDFMin

public void setAbsDFMin(double dFMinimal,
                        int nMax)
                 throws OptimizerException
Set the minimal absolut difference between the lowest 3 function values as the stopping criteria

Overrides:
setAbsDFMin in class IntervalDivider
Parameters:
dFMinimal - the minimal difference between the lowest 3 function values that has to be obtained before the search stops
nMax - the maximum number of iteration before the search stops (in case that dFMinimal cannot be obtained within a reasonable number of trials)
Throws:
OptimizerException - if method is used for Fibonacci algorithm

setMaxIntRed

public void setMaxIntRed(int n)
Sets the maximum number of interval reductions

Overrides:
setMaxIntRed in class IntervalDivider
Parameters:
n - the maximum number of interval reductions