
Public Member Functions | |
| Legendre (const unsigned int p) | |
Static Public Member Functions | |
| static std::vector< Polynomial < double > > | generate_complete_basis (const unsigned int degree) |
Static Private Member Functions | |
| static void | compute_coefficients (const unsigned int p) |
| static const std::vector < double > & | get_coefficients (const unsigned int k) |
Static Private Attributes | |
| static std::vector < std_cxx1x::shared_ptr< const std::vector< double > > > | shifted_coefficients |
| static std::vector < std_cxx1x::shared_ptr< const std::vector< double > > > | recursive_coefficients |
Legendre polynomials of arbitrary degree. Constructing a Legendre polynomial of degree p, the coefficients will be computed by the three-term recursion formula.
, rather than the commonly used interval
. (ii) The polynomials have been scaled in such a way that they are orthonormal, not just orthogonal; consequently, the polynomials do not necessarily have boundary values equal to one.Definition at line 448 of file polynomial.h.
| Polynomials::Legendre::Legendre | ( | const unsigned int | p ) |
Constructor for polynomial of degree p.
| static std::vector<Polynomial<double> > Polynomials::Legendre::generate_complete_basis | ( | const unsigned int | degree ) | [static] |
Return a vector of Legendre polynomial objects of degrees zero through degree, which then spans the full space of polynomials up to the given degree. This function may be used to initialize the TensorProductPolynomials and PolynomialSpace classes.
| static void Polynomials::Legendre::compute_coefficients | ( | const unsigned int | p ) | [static, private] |
Compute coefficients recursively. The coefficients are stored in a static data vector to be available when needed next time. Since the recursion is performed for the interval
, the polynomials are shifted to
by the scale and shift functions of Polynomial, afterwards.
| static const std::vector<double>& Polynomials::Legendre::get_coefficients | ( | const unsigned int | k ) | [static, private] |
Get coefficients for constructor. This way, it can use the non-standard constructor of Polynomial.
std::vector<std_cxx1x::shared_ptr<const std::vector<double> > > Polynomials::Legendre::shifted_coefficients [static, private] |
Coefficients for the interval
.
Definition at line 477 of file polynomial.h.
std::vector<std_cxx1x::shared_ptr<const std::vector<double> > > Polynomials::Legendre::recursive_coefficients [static, private] |
Vector with already computed coefficients. For each degree of the polynomial, we keep one pointer to the list of coefficients; we do so rather than keeping a vector of vectors in order to simplify programming multithread-safe. In order to avoid memory leak, we use a shared_ptr in order to correctly free the memory of the vectors when the global destructor is called.
Definition at line 492 of file polynomial.h.
documentation generated on Fri Feb 3 2012 06:04:16 by
doxygen
1.7.2