lsst.geom
tickets.DM-23835-g1b0a77db9f
|
Go to the documentation of this file.
22 #ifndef LSST_AFW_MATH_POLYNOMIALS_Scaling1d_h_INCLUDED
23 #define LSST_AFW_MATH_POLYNOMIALS_Scaling1d_h_INCLUDED
26 namespace lsst {
namespace geom {
namespace polynomials {
80 return y/_scale - _shift;
84 double getScale() const noexcept {
return _scale; }
87 double getShift() const noexcept {
return _shift; }
97 return Scaling1d(1.0/_scale, -_shift*_scale);
121 return Scaling1d(2.0/(max - min), -0.5*(min + max));
126 #endif // !LSST_AFW_MATH_POLYNOMIALS_Scaling1d_h_INCLUDED
double getShift() const noexcept
Return the additive shift.
double applyForward(double x) const noexcept
Apply the transform in the forward direction.
A 1-d affine transform that can be used to map one interval to another.
Scaling1d then(Scaling1d const &second) const noexcept
Compose two transforms.
Scaling1d(double scale, double shift) noexcept
Construct from the given multiplicative scale and additive shift.
double applyInverse(double y) const noexcept
Apply the inverse of the forward transform;.
Scaling1d makeUnitRangeScaling1d(double min, double max) noexcept
Return a Scaling1d that maps the interval [min, max] to [-1, 1].
Scaling1d inverted() const noexcept
Invert the transform.
double getScale() const noexcept
Return the multiplicative scaling.