Approximations of the function at values in [a,b) are returned as interpolations of the tabulated values. at values outside that range the function itself is used to compute the value. More...
#include <tab_fn.H>
Public Member Functions | |
Constructors | |
| TabulatedFunction (double a, double b, real_fn_t f, int res) | |
Constructor that tabulates the function f over the range [a,b) by taking res samples. | |
| TabulatedFunction (double a, double b, double vals[], int res) | |
Constructor that creates a tabulated function over the range [a,b) from the values in vals. | |
Initialization Functions | |
| void | init (double a, double b, double vals[], int res) |
Creates a tabulated function over the range [a,b) from the values in vals. | |
| void | init (double a, double b, real_fn_t f, int res) |
Tabulates the function f over the range [a,b) by taking res samples. | |
Tabulated Function Evaulation | |
| double | map (double x) const |
Evaluates the tabulated function at x. | |
Protected Attributes | |
| double | _a |
| a (the start of the interval over which the function is tabulated) | |
| double | _b |
| b (the end of the interval over which the function is tabulated) | |
| double | _len |
| b - a (the length of the interval over which the function is tabulated) | |
| int | _res |
| resolution (# of subintervals) | |
| double | _rlen |
| _res / _len (used in computation) | |
| double * | _tab |
| table of values | |
| real_fn_t | _f |
| the given function | |
Related Functions | |
| (Note that these are not member functions.) | |
| typedef double(* | real_fn_t )(double) |
| Function pointer type for the type of functions that can be tabulated by the TabulatedFunction class. | |
Approximations of the function at values in [a,b) are returned as interpolations of the tabulated values. at values outside that range the function itself is used to compute the value.
Definition at line 30 of file tab_fn.H.
|
||||||||||||||||||||
|
Constructor that tabulates the function
Definition at line 53 of file tab_fn.H. References init(). |
|
||||||||||||||||||||
|
Constructor that creates a tabulated function over the range [a,b) from the values in
Definition at line 62 of file tab_fn.H. References init(). |
|
||||||||||||||||||||
|
Tabulates the function
Definition at line 120 of file tab_fn.H. References _a, _b, _f, _len, _res, _rlen, _tab, err_msg(), and err_ret(). |
|
||||||||||||||||||||
|
Creates a tabulated function over the range [a,b) from the values in
Definition at line 85 of file tab_fn.H. References _a, _b, _f, _len, _res, _rlen, _tab, err_msg(), and err_ret(). Referenced by TabulatedFunction(). |
|
|
Evaluates the tabulated function at
Computes the interpolated values of the tabulated function at
If |
|
|
Function pointer type for the type of functions that can be tabulated by the TabulatedFunction class.
|
|
|
a (the start of the interval over which the function is tabulated)
|
|
|
b (the end of the interval over which the function is tabulated)
|
|
|
the given function
|
|
|
b - a (the length of the interval over which the function is tabulated)
Definition at line 40 of file tab_fn.H. Referenced by init(). |
|
|
resolution (# of subintervals)
|
|
|
_res / _len (used in computation)
|
|
|
table of values
|
1.4.4