22 #ifndef LSST_GEOM_LINEAR_TRANSFORM_H
23 #define LSST_GEOM_LINEAR_TRANSFORM_H
26 #include "Eigen/Geometry"
77 typedef Eigen::Matrix<double, 2, 2, Eigen::DontAlign>
Matrix;
108 _matrix = other._matrix;
117 _matrix += other._matrix;
128 _matrix -= other._matrix;
143 ParameterVector
const getParameterVector() const noexcept;
149 void setParameterVector(ParameterVector const& vector) noexcept;
151 Matrix const& getMatrix() const noexcept {
return _matrix; }
155 double const&
operator[](
int i)
const {
return const_cast<Matrix&
>(_matrix)(i % 2, i / 2); }
167 double computeDeterminant() const noexcept;
170 bool isIdentity() const noexcept {
return getMatrix().isIdentity(); }
195 double applyX(
double x,
double y)
const noexcept {
return _matrix(0, 0)*x + _matrix(0, 1)*y; }
196 double applyY(
double x,
double y)
const noexcept {
return _matrix(1, 0)*x + _matrix(1, 1)*y; }
202 TransformDerivativeMatrix dTransform(
Point2D const& input)
const noexcept;
206 return dTransform(
Point2D(input));
#define LSST_EXCEPTION_TYPE(t, b, c)
A class representing an angle.
Extent< double, 2 > Extent2D
std::ostream & operator<<(std::ostream &os, lsst::geom::AffineTransform const &transform)
Point< double, 2 > Point2D