28 namespace lsst {
namespace meas {
namespace astrom {
namespace detail {
32 for (
int i = 1; i < r.size(); ++i) {
38 Eigen::VectorXd r(n + 1);
43 void BinomialMatrix::extend(
int const n) {
45 auto & old = getMatrix();
46 int const m = old.rows() - 1;
48 Eigen::MatrixXd updated = Eigen::MatrixXd::Zero(n + 1, n + 1);
49 updated.topLeftCorner(old.rows(), old.cols()) = old;
50 for (
int i = m + 1; i <= n; ++i) {
53 for (
int j = 1; j < i; ++j) {
54 updated(i, j) = updated(i - 1, j - 1) *
55 (
static_cast<double>(i) / static_cast<double>(j));
62 Eigen::MatrixXd & BinomialMatrix::getMatrix() {
63 static Eigen::MatrixXd it = Eigen::MatrixXd::Constant(2, 2, 1.0);
void computePowers(Eigen::VectorXd &r, double x)
Fill an array with integer powers of x, so .