00001 #ifndef GAUSS1D_H
00002 #define GAUSS1D_H
00003
00004 #include "TSFArray.h"
00005
00006 namespace Sundance
00007 {
00008 using namespace TSF;
00009
00010
00011
00012
00013
00014 class Gauss1D
00015 {
00016 public:
00017
00018 Gauss1D(int n);
00019
00020 Gauss1D(int n, double a, double b);
00021
00022
00023 int nPoints() const {return nodes_.length();}
00024
00025 const TSFArray<double>& nodes() const {return nodes_;}
00026
00027 const TSFArray<double>& weights() const {return weights_;}
00028
00029 static bool unitTest();
00030 private:
00031 void computeWeights(int n, double a, double b);
00032
00033 TSFArray<double> nodes_;
00034 TSFArray<double> weights_;
00035 };
00036
00037 }
00038
00039
00040 #endif
00041