Namespace lsst::meas::astrom::detail¶
-
namespace
detail
Functions
-
int
computePackedOffset
(int order) Compute the index of the first coefficient with the given order in a packed 2-d polynomial coefficient array.
This defines the ordering as
(or the same with indices swapped).[(0,0), (0,1), (1,0), (0,2), (1,1), (2,0), ...]
-
int
computePackedSize
(int order) Compute this size of a packed 2-d polynomial coefficient array.
-
void
computePowers
(Eigen::VectorXd &r, double x) Fill an array with integer powers of x, so \($r[n] == r^n\).
When multiple powers are needed, this should be signficantly faster than repeated calls to std::pow().
-
Eigen::VectorXd
computePowers
(double x, int n) Return an array with integer powers of x, so \($r[n] == r^n\).
When multiple powers are needed, this should be signficantly faster than repeated calls to std::pow().
-
class
BinomialMatrix
- #include <polynomialUtils.h>
A class that computes binomial coefficients up to a certain power.
The binomial coefficient is defined as:
\[ \left(\begin{array}{ c } n k \end{array}right\) = \frac{n!}{k!(n-k)!} \]with both \(n\) and \(k\) nonnegative integers and \(k \le n\)This class uses recurrence relations to avoid computing factorials directly, making it both more efficient and numerically stable.
-
int