LinearSpline Class Reference

Very crude linear spline class. More...

#include <LinearSpline.h>

Inheritance diagram for LinearSpline:

FunctionR1toR1

List of all members.

Public Member Functions

 LinearSpline ()
void operator= (const LinearSpline &rhs)
void initializeWithFunctionValues (Array1D< double > &x_input, Array1D< double > &y_input)
 Initialize the spline with the function values at given points.
void evaluate (double x)
 Evaluates the function at $x$.
double getFunctionValue ()
 Gets the function value at the last evaluated point.
double getFirstDerivativeValue ()
 Gets the function's first deriviate at the last evaluated point.
double getSecondDerivativeValue ()
 Gets the function's second deriviative at the last evaluated point.
double Brent_fmin (double ax, double bx, double tol)
double function (double x)
double minimum (double left, double right)

Private Attributes

Array1D< double > x_list
Array1D< double > y_list
Array1D< double > a0_list
Array1D< double > a1_list
int n
double f
double df


Detailed Description

Very crude linear spline class.

Definition at line 29 of file LinearSpline.h.


Constructor & Destructor Documentation

LinearSpline::LinearSpline (  )  [inline]

Definition at line 32 of file LinearSpline.h.


Member Function Documentation

void LinearSpline::operator= ( const LinearSpline rhs  ) 

Definition at line 15 of file LinearSpline.cpp.

References a0_list, a1_list, f, n, x_list, and y_list.

void LinearSpline::initializeWithFunctionValues ( Array1D< double > &  x_input,
Array1D< double > &  y_input 
)

Initialize the spline with the function values at given points.

Definition at line 27 of file LinearSpline.cpp.

References a0_list, a1_list, Array1D< T >::allocate(), Array1D< T >::dim1(), n, x_list, and y_list.

Referenced by DistributionInverter::make_F_and_F_inverse().

void LinearSpline::evaluate ( double  x  )  [virtual]

Evaluates the function at $x$.

Parameters:
x point to evaluate the function.

Implements FunctionR1toR1.

Definition at line 76 of file LinearSpline.cpp.

References a0, a0_list, a1_list, df, f, n, and x_list.

Referenced by DistributionInverter::random().

double LinearSpline::getFunctionValue (  )  [virtual]

Gets the function value at the last evaluated point.

Returns:
function value.

Implements FunctionR1toR1.

Definition at line 120 of file LinearSpline.cpp.

References f.

Referenced by DistributionInverter::random().

double LinearSpline::getFirstDerivativeValue (  )  [virtual]

Gets the function's first deriviate at the last evaluated point.

Returns:
function's deriviative value.

Implements FunctionR1toR1.

Definition at line 125 of file LinearSpline.cpp.

References df.

double LinearSpline::getSecondDerivativeValue (  )  [virtual]

Gets the function's second deriviative at the last evaluated point.

Returns:
function's second derivative value.

Implements FunctionR1toR1.

Definition at line 130 of file LinearSpline.cpp.

double FunctionR1toR1::Brent_fmin ( double  ax,
double  bx,
double  tol 
) [inherited]

Definition at line 81 of file FunctionR1toR1.cpp.

References FunctionR1toR1::function().

Referenced by FunctionR1toR1::minimum().

double FunctionR1toR1::function ( double  x  )  [inherited]

double FunctionR1toR1::minimum ( double  left,
double  right 
) [inherited]

Definition at line 215 of file FunctionR1toR1.cpp.

References FunctionR1toR1::Brent_fmin().

Referenced by QMCEigenSearch::get_a_diag().


Member Data Documentation

Array1D<double> LinearSpline::x_list [private]

Definition at line 52 of file LinearSpline.h.

Referenced by evaluate(), initializeWithFunctionValues(), and operator=().

Array1D<double> LinearSpline::y_list [private]

Definition at line 53 of file LinearSpline.h.

Referenced by initializeWithFunctionValues(), and operator=().

Array1D<double> LinearSpline::a0_list [private]

Definition at line 54 of file LinearSpline.h.

Referenced by evaluate(), initializeWithFunctionValues(), and operator=().

Array1D<double> LinearSpline::a1_list [private]

Definition at line 55 of file LinearSpline.h.

Referenced by evaluate(), initializeWithFunctionValues(), and operator=().

int LinearSpline::n [private]

Definition at line 57 of file LinearSpline.h.

Referenced by evaluate(), initializeWithFunctionValues(), and operator=().

double LinearSpline::f [private]

Definition at line 59 of file LinearSpline.h.

Referenced by evaluate(), getFunctionValue(), and operator=().

double LinearSpline::df [private]

Definition at line 60 of file LinearSpline.h.

Referenced by evaluate(), and getFirstDerivativeValue().


The documentation for this class was generated from the following files:

Generated on Sat Jul 5 16:14:02 2008 for QMcBeaver by  doxygen 1.5.6