17#include <boost/math/special_functions/binomial.hpp>
25 template <
typename number>
27 get_bernstein_coefficients(
const unsigned int k,
const unsigned int n)
30 ExcMessage(
"Bernstein polynomial needs to be of degree > 0."));
32 std::vector<number> coeff(n + 1, number(0.0));
33 for (
unsigned int i = k; i < n + 1; ++i)
35 coeff[i] = ((i - k) % 2 == 0 ? 1 : -1) *
36 boost::math::binomial_coefficient<number>(n, i) *
37 boost::math::binomial_coefficient<number>(i, k);
43template <
typename number>
45 const unsigned int degree)
47 get_bernstein_coefficients<number>(index, degree))
51#include "polynomials_bernstein.inst"
PolynomialsBernstein(const unsigned int index, const unsigned int degree)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcMessage(std::string arg1)