bracket< Function > Class Template Reference

#include <bracket.h>

List of all members.

Public Member Functions

 bracket (Function &f, unsigned int iterations=100)
int maximum_iterations () const
void maximum_iterations (unsigned int iterations)
void bracket_out (double lower, double initial, double upper)
double upper_bound () const
double lower_bound () const


Detailed Description

template<class Function>
class bracket< Function >

Simple root bracketing routine. Starting with an initial point, a closed interval can be created known to contain at least one root for a function.

Constructor & Destructor Documentation

template<class Function>
bracket< Function >::bracket ( Function &  f,
unsigned int  iterations = 100 
) [inline]

Create a root bracketer for the given function.

Parameters:
f the target function.
iterations maximum number of iterations.


Member Function Documentation

template<class Function>
int bracket< Function >::maximum_iterations (  )  const [inline]

Access the maximum number of iterations.

Returns:
the maximum number of iterations.

template<class Function>
void bracket< Function >::maximum_iterations ( unsigned int  iterations  )  [inline]

Modify the maximum number of iterations.

Parameters:
iterations the new maximum number of iterations.

template<class Function>
void bracket< Function >::bracket_out ( double  lower,
double  initial,
double  upper 
) [inline]

Bracket a root for the target function by creating and continuously expanding an interval around the initial point until the interval is known to contain at least one root. An interval is determined to contain at least one root when the function evaluation at the inteval endpoints are oppisite signs.

Parameters:
lower the lowest possible lower bound for the bracketting interval. The lower bound for the returned interval will never be smaller than lower.
initial the start point used to create the bracketting interval.
upper the largest possible upper bound for the bracketting interval. The upper bound for the returned interval will never be larger than upper.

template<class Function>
double bracket< Function >::upper_bound (  )  const [inline]

After a call to bracket_out, returns the upper bound of the bracketing interval.

Returns:
the bracketing interval upper bound.

template<class Function>
double bracket< Function >::lower_bound (  )  const [inline]

After a call to bracket_out, returns the lower bound of the bracketing interval.

Returns:
the bracketing interval lower bound.


The documentation for this class was generated from the following file:
Generated on Wed Nov 21 22:22:15 2007 for numerics4c++ by  doxygen 1.5.3