43 #ifndef COORDMAPPER_HPP
44 #define COORDMAPPER_HPP 1
65 : _xx(1.0), _x0(0.0) {}
82 void transform(
double &xout,
const double &xin )
const {
83 xout = _xx * xin + _x0;
96 xout = (xin-_x0) / _xx;
108 os <<
"**Coordmapper1D\n";
109 os <<
"_xx = " << _xx <<
"\n";
110 os <<
"_x0 = " << _x0 <<
"\n";
133 : _cmx(cmx), _cmy(cmy) {}
138 : _cmx(xx,x0), _cmy(yy,y0) {}
157 void transform(
double *xout,
const double *xin )
const {
181 os <<
"**Coordmapper x:\n";
183 os <<
"**Coordmapper y:\n";
Coordmapper()
Default constructor for unitary transformation.
Definition: coordmapper.hpp:127
void transform(double &x, double &y) const
Make transformation for coordinates x, y.
Definition: coordmapper.hpp:149
Linear 1D coordinate mapper.
Definition: coordmapper.hpp:57
void inv_transform(double &x, double &y) const
Make inverse transformation for coordinates x, y.
Definition: coordmapper.hpp:164
void inv_transform(double &x) const
Make inverse transformation for coordinate x.
Definition: coordmapper.hpp:101
void transform(double &x) const
Make transformation from coordinates xin to coordinates xout.
Definition: coordmapper.hpp:89
Coordmapper(double xx, double x0, double yy, double y0)
Constructor for fully defined transformation.
Definition: coordmapper.hpp:137
void transform(double &xout, const double &xin) const
Make transformation from coordinates xin to coordinates xout.
Definition: coordmapper.hpp:82
void inv_transform(double &xout, const double &xin) const
Make inverse transformation for coordinate x.
Definition: coordmapper.hpp:95
Coordmapper1D(double xx, double x0)
Constructor for fully defined transformation.
Definition: coordmapper.hpp:69
Linear-linear 2D coordinate mapper.
Definition: coordmapper.hpp:119
void set_transformation(double xx, double x0, double yy, double y0)
Set transformation matrix coefficients.
Definition: coordmapper.hpp:142
void debug_print(std::ostream &os) const
Debug print to stream.
Definition: coordmapper.hpp:180
void set_transformation(double xx, double x0)
Set transformation coefficients.
Definition: coordmapper.hpp:74
void inv_transform(double *xout, const double *xin) const
Make inverse transformation from coordinates xin to coordinates xout.
Definition: coordmapper.hpp:172
Coordmapper(Coordmapper1D cmx, Coordmapper1D cmy)
Constructor for fully defined transformation using 1D coordinate mappers.
Definition: coordmapper.hpp:132
void debug_print(std::ostream &os) const
Debug print to stream.
Definition: coordmapper.hpp:107
void transform(double *xout, const double *xin) const
Make transformation from coordinates xin to coordinates xout.
Definition: coordmapper.hpp:157
Coordmapper1D()
Default constructor for unitary transformation.
Definition: coordmapper.hpp:64