MathTL
|
00001 // -*- c++ -*- 00002 00003 // +--------------------------------------------------------------------+ 00004 // | This file is part of MathTL - the Mathematical Template Library | 00005 // | | 00006 // | Copyright (c) 2002-2009 | 00007 // | Thorsten Raasch, Manuel Werner | 00008 // +--------------------------------------------------------------------+ 00009 00010 #ifndef _MATHTL_GAUSS_QUADRATURE_H 00011 #define _MATHTL_GAUSS_QUADRATURE_H 00012 00013 #include <utils/array1d.h> 00014 #include <numerics/quadrature.h> 00015 #include <numerics/ortho_poly.h> 00016 00017 namespace MathTL 00018 { 00023 class GaussLegendreRule 00024 : public QuadratureRule<1> 00025 { 00026 public: 00030 GaussLegendreRule(const unsigned int N); 00031 }; 00032 00051 class GaussRule 00052 : public QuadratureRule<1> 00053 { 00054 public: 00062 GaussRule(const OrthogonalPolynomial& P, 00063 const double a, const double b, 00064 const unsigned int N); 00065 00070 GaussRule(const Array1D<double>& moments, 00071 const double a, const double b, 00072 const unsigned int N); 00073 00078 GaussRule(const Array1D<double>& moments, 00079 const OrthogonalPolynomial& T, 00080 const double a, const double b, 00081 const unsigned int N); 00082 00083 private: 00087 void init(const OrthogonalPolynomial& P, 00088 const double a, const double b, 00089 const unsigned int N); 00090 }; 00091 } 00092 00093 // include implementation of inline functions 00094 #include <numerics/gauss_quadrature.cpp> 00095 00096 #endif