|
Mantid
|
Unique CoordCenterVectorParam type declaration for ndimensional coordinate centers. More...
#include <CoordTransformDistance.h>
Public Member Functions | |
| void | apply (const coord_t *inputVector, coord_t *outVector) const override |
| Apply the coordinate transformation. More... | |
| CoordTransform * | clone () const override |
| Virtual cloner. More... | |
| CoordTransformDistance (const size_t inD, const coord_t *center, const bool *dimensionsUsed, const size_t outD=1, const std::vector< Kernel::V3D > &eigenvects=std::vector< Kernel::V3D >(0), const std::vector< double > &eigenvals=std::vector< double >(0, 0.0)) | |
| Constructor. More... | |
| const std::vector< coord_t > & | getCenter () |
| Return the center coordinate array. More... | |
| const std::vector< bool > & | getDimensionsUsed () |
| Return the dimensions used bool array. More... | |
| std::string | id () const override |
| Coordinate transform id. More... | |
| std::string | toXMLString () const override |
| Serialize the coordinate transform distance. More... | |
Public Member Functions inherited from Mantid::API::CoordTransform | |
| virtual void | apply (const coord_t *inputVector, coord_t *outVector) const =0 |
| Mantid::Kernel::VMD | applyVMD (const Mantid::Kernel::VMD &inputVector) const |
| Wrapper for VMD. More... | |
| virtual CoordTransform * | clone () const =0 |
| CoordTransform (const size_t inD, const size_t outD) | |
| Constructor. More... | |
| size_t | getInD () const |
| size_t | getOutD () const |
| virtual std::string | id () const =0 |
| virtual Mantid::Kernel::Matrix< coord_t > | makeAffineMatrix () const |
| virtual std::string | toXMLString () const =0 |
| Pure abstract methods to be implemented. More... | |
| virtual | ~CoordTransform ()=default |
Protected Attributes | |
| std::vector< coord_t > | m_center |
| Coordinates at the center. More... | |
| std::vector< bool > | m_dimensionsUsed |
| Parmeter where True is set for those dimensions that are considered when calculating distance. More... | |
| std::vector< double > | m_eigenvals |
| std::vector< Kernel::V3D > | m_eigenvects |
| double | m_maxEigenval |
Protected Attributes inherited from Mantid::API::CoordTransform | |
| size_t | inD |
| Input number of dimensions. More... | |
| size_t | outD |
| Output number of dimensions. More... | |
Unique CoordCenterVectorParam type declaration for ndimensional coordinate centers.
Unique DimensionsUsedVectorParam type declaration for boolean masks over dimensions A non-linear coordinate transform that takes a point from nd dimensions and converts it to a single dimension: the SQUARE of the distance between the MDLeanEvent and a given point in up to nd dimensions.
The number of output dimensions is 1 (the square of the distance to the point).
The square is used instead of the plain distance since square root is a slow calculation.
Definition at line 39 of file CoordTransformDistance.h.
| Mantid::DataObjects::CoordTransformDistance::CoordTransformDistance | ( | const size_t | inD, |
| const coord_t * | center, | ||
| const bool * | dimensionsUsed, | ||
| const size_t | outD = 1, |
||
| const std::vector< Kernel::V3D > & | eigenvects = std::vector<Kernel::V3D>(0), |
||
| const std::vector< double > & | eigenvals = std::vector<double>(0, 0.0) |
||
| ) |
Constructor.
| inD | :: # of input dimensions |
| center | :: array of size[inD], with the coordinates at the center |
| dimensionsUsed | :: bool array of size[inD] where True is set for those dimensions that are considered when calculating distance. |
| outD | :: # of output dimensions |
| eigenvects | :: eigenvectors of an ellipsoid (if used) |
| eigenvals | :: variances along each eigenvector (if used) |
Definition at line 34 of file CoordTransformDistance.cpp.
References Mantid::Geometry::d, Mantid::API::CoordTransform::inD, m_center, m_dimensionsUsed, m_eigenvals, m_eigenvects, and m_maxEigenval.
|
overridevirtual |
Apply the coordinate transformation.
Calculate the SQUARE of the distance between the input coordinates to m_center but only on dimensionsUsed[d] == true.
| inputVector | :: fixed-size array of input coordinates, of size inD |
| outVector | :: fixed-size array of output coordinates, of size 1 |
Return the only output dimension
Implements Mantid::API::CoordTransform.
Definition at line 70 of file CoordTransformDistance.cpp.
References Mantid::Geometry::d, Mantid::API::CoordTransform::inD, m_center, m_dimensionsUsed, m_eigenvals, m_eigenvects, m_maxEigenval, and Mantid::API::CoordTransform::outD.
|
overridevirtual |
Virtual cloner.
Implements Mantid::API::CoordTransform.
Definition at line 58 of file CoordTransformDistance.cpp.
|
inline |
Return the center coordinate array.
Definition at line 52 of file CoordTransformDistance.h.
|
inline |
Return the dimensions used bool array.
Definition at line 55 of file CoordTransformDistance.h.
|
overridevirtual |
Coordinate transform id.
Implements Mantid::API::CoordTransform.
Definition at line 175 of file CoordTransformDistance.cpp.
|
overridevirtual |
Serialize the coordinate transform distance.
Implements Mantid::API::CoordTransform.
Definition at line 130 of file CoordTransformDistance.cpp.
References Mantid::Geometry::d, Mantid::API::CoordTransform::inD, m_center, m_dimensionsUsed, and Mantid::API::CoordTransform::outD.
|
protected |
Coordinates at the center.
Definition at line 59 of file CoordTransformDistance.h.
Referenced by apply(), CoordTransformDistance(), and toXMLString().
|
protected |
Parmeter where True is set for those dimensions that are considered when calculating distance.
Definition at line 63 of file CoordTransformDistance.h.
Referenced by apply(), CoordTransformDistance(), and toXMLString().
|
protected |
Definition at line 67 of file CoordTransformDistance.h.
Referenced by apply(), and CoordTransformDistance().
|
protected |
Definition at line 66 of file CoordTransformDistance.h.
Referenced by apply(), and CoordTransformDistance().
|
protected |
Definition at line 68 of file CoordTransformDistance.h.
Referenced by apply(), and CoordTransformDistance().