Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Sources   Namespace Members   Compound Members   File Members  

func::single_dimension_implicit Class Reference

A function that maps one real number to another, but which is defined implicitly. More...

#include <func.h>

List of all members.


Public Members

 single_dimension_implicit ( const T &fx, const double tol )
The only constructur for a single_dimension_implicit function. More...

virtual ~single_dimension_implicit (void)
virtual T evaluate ( const double x, T fx1, T fx2, const double tol ) const = 0
Evaluate the function, provided an initial guess. More...

virtual T evaluate ( const double x, const double tol ) const = 0
Evaluate the function, using the default guess. More...

default_guess
The initial guess to use for function computations when no other guess is provided.

double default_tol
The calculation tolerance to use for function computations when no explicit tolerance is provided.


Detailed Description

template<class T> class func::single_dimension_implicit

A function that maps one real number to another, but which is defined implicitly.

That is, computing the mapping is difficult because there is no explicit equation for calculating the value from the argument. Instead, the mapping must be computed iteratively from an initial guess.

Parameters:
T   the return type of the function. Usually, T is double, but could be vector<double>.

Definition at line 75 of file func.h.


Member Function Documentation

template<class T>
func::single_dimension_implicit<T>::single_dimension_implicit<T> (const T & fx, const double tol) [inline]

The only constructur for a single_dimension_implicit function.

Parameters:
fx   the initial guess to use for function computations when no other guess is provided
tol   the calculation tolerance to use when no explicit tolerance is provided

Postconditions:
 assert( this->default_guess == fx );
 assert( this->default_tol == tol );

Definition at line 153 of file func.h.

template<class T>
func::single_dimension_implicit<T>::~single_dimension_implicit<T> (void) [inline, virtual]

Definition at line 164 of file func.h.

template<class T>
virtual T func::single_dimension_implicit<T>::evaluate (const double x, T fx1, T fx2, const double tol) const [pure virtual]

Evaluate the function, provided an initial guess.

Parameters:
x   the argument of the function
fx1   one bracket of the value of the function
fx2   the other bracket of the value of the function
tol   the calculation tolerance
Returns:
The value of the function for argument x.

The parameters fx1 and fx2 should bracket the value of the function. That is, the value of the function should lie between those two values.

template<class T>
virtual T func::single_dimension_implicit<T>::evaluate (const double x, const double tol) const [pure virtual]

Evaluate the function, using the default guess.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
x   the argument of the function
tol   the calculation tolerance
Returns:
The value of the function for argument x.

Member Data Documentation

template<class T>
T func::single_dimension_implicit<T>::default_guess

The initial guess to use for function computations when no other guess is provided.

Definition at line 106 of file func.h.

template<class T>
double func::single_dimension_implicit<T>::default_tol

The calculation tolerance to use for function computations when no explicit tolerance is provided.

Definition at line 112 of file func.h.


The documentation for this class was generated from the following file:
Generated at Sun Jul 14 20:38:19 2002 for Mapper by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999