gauss.h

来自「The Spectral Toolkit is a C++ spectral t」· C头文件 代码 · 共 47 行

H
47
字号
//// spectral toolkit // copyright (c) 2005 university corporation for atmospheric research// licensed under the gnu general public license//#ifndef __gauss__#define __gauss__#include "spectral.h"namespace spectral{  /// Base class for Gaussian quadratures.  Includes common methods  /// and members for the Legendre and Lobatto quadratures.  class gauss  {    public:    gauss(int n);    ~gauss();    /// Gaussian point function.      /// \param i index from \f$ 0, \ldots, n-1 \f$    /// \return value of point at i    inline real point(int i) { return(points[i]); }    /// Gaussian weight function.      /// \param i index from \f$ 0, \ldots, n-1 \f$    /// \return value of weight at i    inline real weight(int i) { return(weights[i]); }  protected:    /// Internal machine precision used for iteration.  Set in constructor.    real eps;    /// Internal array to store Gaussian weights.    real *weights;    /// Internal array to store Gaussian points.    real *points;    /// Internal length (total).    int n;  };}#endif// Local Variables:// mode:C++// End:

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?