875 const std::array<Number2, n_entries> &x,
876 const unsigned int n_derivatives,
877 std::array<Number2, n_entries> *values)
const
880 if (in_lagrange_product_form ==
true)
885 const unsigned int n_supp = lagrange_support_points.size();
886 const number weight = lagrange_weight;
887 switch (n_derivatives)
890 for (
unsigned int e = 0; e < n_entries; ++e)
891 values[0][e] = weight;
892 for (
unsigned int k = 1; k <= n_derivatives; ++k)
893 for (
unsigned int e = 0; e < n_entries; ++e)
895 for (
unsigned int i = 0; i < n_supp; ++i)
897 std::array<Number2, n_entries> v = x;
898 for (
unsigned int e = 0; e < n_entries; ++e)
899 v[e] -= lagrange_support_points[i];
907 for (
unsigned int k = n_derivatives; k > 0; --k)
908 for (
unsigned int e = 0; e < n_entries; ++e)
909 values[k][e] = (values[k][e] * v[e] + values[k - 1][e]);
910 for (
unsigned int e = 0; e < n_entries; ++e)
911 values[0][e] *= v[e];
916 number k_factorial = 2;
917 for (
unsigned int k = 2; k <= n_derivatives; ++k)
919 for (
unsigned int e = 0; e < n_entries; ++e)
920 values[k][e] *= k_factorial;
921 k_factorial *=
static_cast<number
>(k + 1);
933 std::array<Number2, n_entries> value;
934 for (
unsigned int e = 0; e < n_entries; ++e)
936 for (
unsigned int i = 0; i < n_supp; ++i)
937 for (
unsigned int e = 0; e < n_entries; ++e)
938 value[e] *= (x[e] - lagrange_support_points[i]);
940 for (
unsigned int e = 0; e < n_entries; ++e)
941 values[0][e] = value[e];
947 std::array<Number2, n_entries> value, derivative = {};
948 for (
unsigned int e = 0; e < n_entries; ++e)
950 for (
unsigned int i = 0; i < n_supp; ++i)
951 for (
unsigned int e = 0; e < n_entries; ++e)
953 const Number2 v = x[e] - lagrange_support_points[i];
954 derivative[e] = derivative[e] * v + value[e];
958 for (
unsigned int e = 0; e < n_entries; ++e)
960 values[0][e] = value[e];
961 values[1][e] = derivative[e];
968 std::array<Number2, n_entries> value, derivative = {},
970 for (
unsigned int e = 0; e < n_entries; ++e)
972 for (
unsigned int i = 0; i < n_supp; ++i)
973 for (
unsigned int e = 0; e < n_entries; ++e)
975 const Number2 v = x[e] - lagrange_support_points[i];
977 derivative[e] = derivative[e] * v + value[e];
981 for (
unsigned int e = 0; e < n_entries; ++e)
983 values[0][e] = value[e];
984 values[1][e] = derivative[e];
985 values[2][e] =
static_cast<number
>(2) *
second[e];
997 const unsigned int m = coefficients.size();
998 std::vector<std::array<Number2, n_entries>> a(coefficients.size());
999 for (
unsigned int i = 0; i < coefficients.size(); ++i)
1000 for (
unsigned int e = 0; e < n_entries; ++e)
1001 a[i][e] = coefficients[i];
1003 unsigned int j_factorial = 1;
1008 const unsigned int min_valuessize_m =
std::min(n_derivatives + 1, m);
1009 for (
unsigned int j = 0; j < min_valuessize_m; ++j)
1011 for (
int k = m - 2; k >=
static_cast<int>(j); --k)
1012 for (
unsigned int e = 0; e < n_entries; ++e)
1013 a[k][e] += x[e] * a[k + 1][e];
1014 for (
unsigned int e = 0; e < n_entries; ++e)
1015 values[j][e] =
static_cast<number
>(j_factorial) * a[j][e];
1017 j_factorial *= j + 1;
1021 for (
unsigned int j = min_valuessize_m; j <= n_derivatives; ++j)
1022 for (
unsigned int e = 0; e < n_entries; ++e)