30 namespace lsst {
namespace geom {
namespace polynomials {
35 Eigen::VectorXd r(n + 1);
37 for (
int i = 1; i <= n; ++i) {
46 template <PackingOrder packing>
51 auto rPow = computePowers(
basis.getScaling().getX().getScale(), n);
52 auto sPow = computePowers(
basis.getScaling().getY().getScale(), n);
53 auto uPow = computePowers(
basis.getScaling().getX().getShift(), n);
54 auto vPow = computePowers(
basis.getScaling().getY().getShift(), n);
56 for (
auto const & i :
basis.getIndices()) {
58 double tmp = binomial(i.nx, j)*uPow[j] *
59 f[i.flat]*rPow[i.nx]*sPow[i.ny];
61 sums[
basis.index(i.nx - j, i.ny - k)] +=
62 binomial(i.ny, k)*vPow[k]*tmp;
66 Eigen::VectorXd
result = Eigen::VectorXd::Zero(
basis.size());
68 result[i] =
static_cast<double>(sums[i]);