MathTL
 All Classes Functions Variables Typedefs Enumerations
Public Types | Public Member Functions | Protected Attributes
MathTL::Piecewise< C > Class Template Reference

#include <piecewise.h>

Inheritance diagram for MathTL::Piecewise< C >:
MathTL::Function< 1, C > MathTL::FunctionTime

List of all members.

Public Types

typedef std::map< int,
Polynomial< C > > 
PiecesType

Public Member Functions

 Piecewise ()
 Piecewise (const Piecewise< C > &p)
 Piecewise (const int j)
 ~Piecewise ()
Polynomial< C > get_local_expansion (const int k) const
const PiecesType * get_expansion () const
void set_local_expansion (const int k, const Polynomial< C > &p)
int get_granularity () const
void clip_me (const int k1, const int k2)
Piecewise< C > clip (const int k1, const int k2) const
void split_me (const int jnew)
Piecewise split (const int jnew) const
void dilate_me (const int j)
Piecewise< C > dilate (const int j) const
void shift_me (const int k)
Piecewise< C > shift (const int k) const
Piecewise< C > differentiate () const
double integrate (const bool quadrature=false) const
double integrate (const int k1, const int k2, const bool quadrature=false) const
value (const C x) const
value (const Point< 1 > &x, const unsigned int component=0) const
void vector_value (const Point< 1 > &p, Vector< C > &values) const
derivative (const C x) const
secondDerivative (const C x) const
Piecewise< C > & scale (const C c)
Piecewise< C > & add (const Polynomial< C > &p)
Piecewise< C > & add (const Piecewise< C > &p)
inner_product (const Piecewise< C > &p) const
inner_product (const Polynomial< C > &p) const
Piecewise< C > & operator= (const Piecewise< C > &p)
operator() (const C x) const
Piecewise< C > & operator+= (const Polynomial< C > &p)
Piecewise< C > & operator+= (const Piecewise< C > &p)
Piecewise< C > & operator-= (const Polynomial< C > &p)
Piecewise< C > & operator-= (const Piecewise< C > &p)
Piecewise< C > & operator*= (const C c)
Piecewise< C > & operator*= (const Polynomial< C > &p)
Piecewise< C > & operator*= (const Piecewise< C > &p)
void MatError (char *str) const

Protected Attributes

PiecesType expansion
int granularity

Detailed Description

template<class C>
class MathTL::Piecewise< C >

A template class for univariate compactly supported functions f which admit a piecewise polynomial representation.

The nodes of a piecewise function are assumed to take dyadic values 2^{-j}k, with

Note:

Piecewise polynomial functions may be

We derive Piecewise<C> from the class Function<1>, as it is indeed one.


Constructor & Destructor Documentation

template<class C >
MathTL::Piecewise< C >::Piecewise ( )

default constructor: yields the zero spline, granularity j=0

default constructor

template<class C >
MathTL::Piecewise< C >::Piecewise ( const Piecewise< C > &  p)

copy constructor

template<class C >
MathTL::Piecewise< C >::Piecewise ( const int  j)

constructor with predefined granularity j

constructor for predefined granularity

template<class C >
MathTL::Piecewise< C >::~Piecewise ( )

destructor


Member Function Documentation

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::add ( const Polynomial< C > &  p)

add a polynomial to this piecewise

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::add ( const Piecewise< C > &  p)

add an other piecewise to this piecewise

template<class C >
Piecewise< C > MathTL::Piecewise< C >::clip ( const int  k1,
const int  k2 
) const

clip to [2^{-j}k1,2^{-j}k2]

template<class C >
void MathTL::Piecewise< C >::clip_me ( const int  k1,
const int  k2 
)

clip this spline to [2^{-j}k1,2^{-j}k2]

clip

template<class C >
C MathTL::Piecewise< C >::derivative ( const C  x) const

point evaluation of first derivative

template<class C >
Piecewise< C > MathTL::Piecewise< C >::differentiate ( ) const

symbolic differentiation

template<class C >
Piecewise< C > MathTL::Piecewise< C >::dilate ( const int  j) const

dilate by 2^{-j} (makes a copy)

template<class C >
void MathTL::Piecewise< C >::dilate_me ( const int  j)

dilate by 2^{-j} f(x) -> 2^{j/2} f(2^j x)

dilate

template<class C >
const Piecewise< C >::PiecesType * MathTL::Piecewise< C >::get_expansion ( ) const

read access, all polynomials get all polynomial representations

reading access, all polynomials

template<class C>
int MathTL::Piecewise< C >::get_granularity ( ) const [inline]

get the granularity j

template<class C >
Polynomial< C > MathTL::Piecewise< C >::get_local_expansion ( const int  k) const

read access, local expansion get the local polynomial representation at interval k

reading access, local expansion on one subinterval

template<class C >
C MathTL::Piecewise< C >::inner_product ( const Piecewise< C > &  p) const

inner product with another piecewise (don't use this extensively, since one copy has to be made!)

inner product with another piecewise

template<class C >
C MathTL::Piecewise< C >::inner_product ( const Polynomial< C > &  p) const

inner product with another polynomial (don't use this extensively, since one copy has to be made!)

inner product with a polynomial

template<class C >
double MathTL::Piecewise< C >::integrate ( const bool  quadrature = false) const

integration over entire support

integration, entire support

template<class C >
double MathTL::Piecewise< C >::integrate ( const int  k1,
const int  k2,
const bool  quadrature = false 
) const

integration over [2^{-j}k1,2^{-j}k2]

integration, specific support

template<class C >
void MathTL::Piecewise< C >::MatError ( char *  str) const

Error output

template<class C >
C MathTL::Piecewise< C >::operator() ( const C  x) const

point evaluation

point evaluation operator

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::operator*= ( const C  c)

scaling with a constant

in-place multiplication with a constant

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::operator*= ( const Polynomial< C > &  p)

pointwise multiplication with a polynomial

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::operator*= ( const Piecewise< C > &  p)

pointwise multiplication with another piecewise

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::operator+= ( const Polynomial< C > &  p)

in-place addition of a polynomial p

add a polynomial to this piecewise

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::operator+= ( const Piecewise< C > &  p)

in-place addition of a piecewise p

add an other piecewise to this piecewise

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::operator-= ( const Polynomial< C > &  p)

subtraction of a polynomial

subtract a polynomial from this piecewise

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::operator-= ( const Piecewise< C > &  p)

subtraction of another piecewise

subtract an other piecewise from this piecewise

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::operator= ( const Piecewise< C > &  p)

assignment of another piecewise

template<class C >
Piecewise< C > & MathTL::Piecewise< C >::scale ( const C  c)

in-place multiplication with a constant

template<class C >
C MathTL::Piecewise< C >::secondDerivative ( const C  x) const

point evaluation of second derivative

template<class C >
void MathTL::Piecewise< C >::set_local_expansion ( const int  k,
const Polynomial< C > &  p 
)

write access, local expansion set the local polynomial representation at interval k

writing access, local expansion

template<class C >
Piecewise< C > MathTL::Piecewise< C >::shift ( const int  k) const

shift by 2^{-j}k (makes a copy)

template<class C >
void MathTL::Piecewise< C >::shift_me ( const int  k)

shift by 2^{-j}k

shift

template<class C >
Piecewise< C > MathTL::Piecewise< C >::split ( const int  jnew) const

increase granularity, jnew >= current granularity

template<class C >
void MathTL::Piecewise< C >::split_me ( const int  jnew)

increase granularity, jnew >= current granularity

increase granularity

template<class C >
C MathTL::Piecewise< C >::value ( const C  x) const

point evaluation

template<class C >
C MathTL::Piecewise< C >::value ( const Point< 1 > &  p,
const unsigned int  component = 0 
) const [inline]

point evaluation (calls the above value(const C)) needed as inheritance from Function<C>

point evaluation (calls above value(const C))

template<class C >
void MathTL::Piecewise< C >::vector_value ( const Point< 1 > &  p,
Vector< C > &  values 
) const [inline]

point evaluation (calls the above value(const C)) needed as inheritance from Function<C>


The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations