proj home

Files   Classes   Functions   Hierarchy  

powerseriesWD< T > Class Template Reference

W powerseries equations with N dimension each. More...

#include <powerseriesWD.h>

Collaboration diagram for powerseriesWD< T >:

List of all members.

Public Member Functions

void currentSet (uintc i)
 Set the current equation.
 powerseriesWD (T *const mat_, uintc W_, uintc N_)
 Supply a matrix representing W power series equations.
void operator() (T &val, T const t) const
 Evalute the power series at t.
T const operator() (T const t) const
 Evalute the power series at t.

Public Attributes

T *const mat
 The matrix representing the power series equations.
uintc W
 W equations.
uintc N
 N dimension in each equation.
powerseries1D< TcurrentP
 The current power series.


Detailed Description

template<typename T>
class powerseriesWD< T >

W powerseries equations with N dimension each.

This class is a power series in N dimensions. It has a current state held in currentP. By setting the current state this class represents one of the W equations.

Example
  uintc N(4);
  uintc W(2);
  double az[W*N] = 
  { 
    1.0, 2.0, 3.0, 4.0,
    3.0, -7.0, 4.5, 0.0
  };

  powerseriesWD<double> f(az,W,N);

  double y;
  f.currentSet(0);
  cout << "Expect 10" << endl;
  y=f(1.0);

Definition at line 37 of file powerseriesWD.h.


Constructor & Destructor Documentation

template<typename T >
powerseriesWD< T >::powerseriesWD ( T *const   mat_,
uintc  W_,
uintc  N_ 
) [inline]

Supply a matrix representing W power series equations.

Definition at line 80 of file powerseriesWD.h.

00085   : mat(mat_), W(W_), N(N_)
00086 { 
00087   currentP.construct(mat_,N);
00088 }


Member Function Documentation

template<typename T >
void powerseriesWD< T >::currentSet ( uintc  i  )  [inline]

Set the current equation.

Definition at line 70 of file powerseriesWD.h.

References powerseriesWD< T >::currentP, powerseriesWD< T >::mat, and powerseriesWD< T >::N.

Referenced by powerseriestest::test02().

00071 {
00072   assert( (i==0) || (i<N) );
00073   currentP.construct(mat+i*N,N);
00074 }

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

Evalute the power series at t.

Definition at line 63 of file powerseriesWD.h.

References powerseriesWD< T >::currentP.

00064     { return currentP(t); }

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

Evalute the power series at t.

Definition at line 59 of file powerseriesWD.h.

References powerseriesWD< T >::currentP.

00060     { currentP(val,t); }


Member Data Documentation

template<typename T>
powerseries1D<T> powerseriesWD< T >::currentP

The current power series.

Definition at line 50 of file powerseriesWD.h.

Referenced by powerseriesWD< T >::currentSet(), and powerseriesWD< T >::operator()().

template<typename T>
T* const powerseriesWD< T >::mat

The matrix representing the power series equations.

Definition at line 42 of file powerseriesWD.h.

Referenced by powerseriesWD< T >::currentSet().

template<typename T>
uintc powerseriesWD< T >::N

N dimension in each equation.

(columns)

Definition at line 47 of file powerseriesWD.h.

Referenced by powerseriesWD< T >::currentSet().

template<typename T>
uintc powerseriesWD< T >::W

W equations.

(rows)

Definition at line 45 of file powerseriesWD.h.


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

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