proj home

Files   Classes   Functions   Hierarchy  

vecInterp2D1< T > Class Template Reference

A first order interploation between two points. More...

#include <vecinterp.h>

Collaboration diagram for vecInterp2D1< T >:

List of all members.

Public Member Functions

 vecInterp2D1 (T const &_p0, T const &_dp0, T const &_p1, T const &_dp1)
 The boundary conditions at the two points are vectors.
void operator() (T &val, doublec t) const
 A vector function where t=0.0 gives p0 and t=1.0 gives p1.
T const operator() (doublec t) const
 A vector function where t=0.0 gives p0 and t=1.0 gives p1.

Public Attributes

T p0
T dp0
T p1
T dp1


Detailed Description

template<typename T>
class vecInterp2D1< T >

A first order interploation between two points.

This is better than the linear interpolation. Cubic polynomials are used to fit the first derivative boundary conditions at the end points.

The values of the powerseries were pre calculated so that the vector they are multiplying either exists or not at the boundary points. For example, p0 has fA0 summing to 1 when t=0. fA0 sums to 0 at t=1. Taking the derivative of fA0 call it fA0' evaluates to 0 ant t=0 and t=1.

Definition at line 46 of file vecinterp.h.


Constructor & Destructor Documentation

template<typename T>
vecInterp2D1< T >::vecInterp2D1 ( T const &  _p0,
T const &  _dp0,
T const &  _p1,
T const &  _dp1 
) [inline]

The boundary conditions at the two points are vectors.

Definition at line 65 of file vecinterp.h.

00070     : p0(_p0), dp0(_dp0), p1(_p1), dp1(_dp1) 
00071     {} 


Member Function Documentation

template<typename T>
T const vecInterp2D1< T >::operator() ( doublec  t  )  const [inline]

A vector function where t=0.0 gives p0 and t=1.0 gives p1.

Definition at line 78 of file vecinterp.h.

References vecInterp2D1< T >::dp0, vecInterp2D1< T >::dp1, vecInterp2D1< T >::p0, and vecInterp2D1< T >::p1.

00079     { return p0*fA0(t) + dp0*fB0(t) + p1*fA1(t) + dp1*fB1(t); }

template<typename T>
void vecInterp2D1< T >::operator() ( T val,
doublec  t 
) const [inline]

A vector function where t=0.0 gives p0 and t=1.0 gives p1.

Definition at line 74 of file vecinterp.h.

References vecInterp2D1< T >::dp0, vecInterp2D1< T >::dp1, vecInterp2D1< T >::p0, and vecInterp2D1< T >::p1.

00075     { val = p0*fA0(t) + dp0*fB0(t) + p1*fA1(t) + dp1*fB1(t); }


Member Data Documentation

template<typename T>
T vecInterp2D1< T >::dp0

Definition at line 59 of file vecinterp.h.

Referenced by vecInterp2D1< T >::operator()().

template<typename T>
T vecInterp2D1< T >::dp1

Definition at line 61 of file vecinterp.h.

Referenced by vecInterp2D1< T >::operator()().

template<typename T>
T vecInterp2D1< T >::p0

Definition at line 58 of file vecinterp.h.

Referenced by vecInterp2D1< T >::operator()().

template<typename T>
T vecInterp2D1< T >::p1

Definition at line 60 of file vecinterp.h.

Referenced by vecInterp2D1< T >::operator()().


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

Generated on Fri Mar 4 00:50:23 2011 for Chelton Evans Source by  doxygen 1.5.8