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;
88 ~LinearTransform() noexcept =
default;
91 return LinearTransform(getMatrix() *
other.getMatrix());
95 return LinearTransform((
Matrix() <<
s, 0.0, 0.0,
s).finished());
99 return LinearTransform((
Matrix() <<
s, 0.0, 0.0, t).finished());
103 return LinearTransform(
Matrix(Eigen::Rotation2D<double>(t.asRadians())));
108 _matrix =
other._matrix;
117 _matrix +=
other._matrix;
122 LinearTransform tmp(*
this);
128 _matrix -=
other._matrix;
133 LinearTransform tmp(*
this);
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); }
162 LinearTransform
const invert()
const;
167 double computeDeterminant()
const noexcept;
170 bool isIdentity() const noexcept {
return getMatrix().isIdentity(); }
191 TransformDerivativeMatrix dTransform(
Point2D const& input)
const noexcept;
195 return dTransform(
Point2D(input));
207 #endif // !LSST_GEOM_LINEAR_TRANSFORM_H
Relationship invert(Relationship r)
Given the relationship between two sets A and B (i.e.
A class representing an angle.
Point< double, 2 > Point2D
A base class for image defects.
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Typedefs to be used for probability and parameter values.
std::ostream & operator<<(std::ostream &os, lsst::geom::AffineTransform const &transform)
ItemVariant const * other
Extent< double, 2 > Extent2D
#define LSST_EXCEPTION_TYPE(t, b, c)
Macro used to define new types of exceptions without additional data.
Reports errors that are due to events beyond the control of the program.