Monomial(const unsigned int n,
const double coefficient = 1.);
+ /**
+ * Return a vector of Monomial
+ * objects of orders zero
+ * through @p{degree}, which
+ * then spans the full space of
+ * polynomials up to the given
+ * degree. This function may be
+ * used to initialize the
+ * @ref{TensorProductPolynomials}
+ * and @ref{PolynomialSpace}
+ * classes.
+ */
+ static
+ std::vector<Polynomial<number> >
+ generate_complete_basis (const unsigned int degree);
+
private:
/**
* Needed by constructor.
{}
+ template <typename number>
+ std::vector<Polynomial<number> >
+ Monomial<number>::generate_complete_basis (const unsigned int degree)
+ {
+ std::vector<Polynomial<number> > v;
+ v.reserve(degree+1);
+ for (unsigned int i=0; i<=degree; ++i)
+ v.push_back (Monomial<number>(i));
+ return v;
+ }
// ------------------ class LagrangeEquidistant --------------- //
LagrangeEquidistant::LagrangeEquidistant (const unsigned int n,
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams