Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Mantid::DataObjects::CoordTransformDistance Class Reference

Unique CoordCenterVectorParam type declaration for ndimensional coordinate centers. More...

#include <CoordTransformDistance.h>

Inheritance diagram for Mantid::DataObjects::CoordTransformDistance:
Mantid::API::CoordTransform

Public Member Functions

void apply (const coord_t *inputVector, coord_t *outVector) const override
 Apply the coordinate transformation. More...
 
CoordTransformclone () 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 CoordTransformclone () 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_tmakeAffineMatrix () const
 
virtual std::string toXMLString () const =0
 Pure abstract methods to be implemented. More...
 
virtual ~CoordTransform ()=default
 

Protected Attributes

std::vector< coord_tm_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::V3Dm_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...
 

Detailed Description

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.

Author
Janik Zikovsky
Date
2011-04-25 14:48:33.517020

Definition at line 39 of file CoordTransformDistance.h.

Constructor & Destructor Documentation

◆ CoordTransformDistance()

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.

Parameters
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)
Returns

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.

Member Function Documentation

◆ apply()

void Mantid::DataObjects::CoordTransformDistance::apply ( const coord_t inputVector,
coord_t outVector 
) const
overridevirtual

Apply the coordinate transformation.

Calculate the SQUARE of the distance between the input coordinates to m_center but only on dimensionsUsed[d] == true.

Parameters
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.

◆ clone()

CoordTransform * Mantid::DataObjects::CoordTransformDistance::clone ( ) const
overridevirtual

Virtual cloner.

Returns
a copy of this object

Implements Mantid::API::CoordTransform.

Definition at line 58 of file CoordTransformDistance.cpp.

◆ getCenter()

const std::vector< coord_t > & Mantid::DataObjects::CoordTransformDistance::getCenter ( )
inline

Return the center coordinate array.

Definition at line 52 of file CoordTransformDistance.h.

◆ getDimensionsUsed()

const std::vector< bool > & Mantid::DataObjects::CoordTransformDistance::getDimensionsUsed ( )
inline

Return the dimensions used bool array.

Definition at line 55 of file CoordTransformDistance.h.

◆ id()

std::string Mantid::DataObjects::CoordTransformDistance::id ( ) const
overridevirtual

Coordinate transform id.

Returns
the type of coordinate transform

Implements Mantid::API::CoordTransform.

Definition at line 175 of file CoordTransformDistance.cpp.

◆ toXMLString()

std::string Mantid::DataObjects::CoordTransformDistance::toXMLString ( ) const
overridevirtual

Serialize the coordinate transform distance.

Returns
The coordinate transform distance in its serialized form.

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.

Member Data Documentation

◆ m_center

std::vector<coord_t> Mantid::DataObjects::CoordTransformDistance::m_center
protected

Coordinates at the center.

Definition at line 59 of file CoordTransformDistance.h.

Referenced by apply(), CoordTransformDistance(), and toXMLString().

◆ m_dimensionsUsed

std::vector<bool> Mantid::DataObjects::CoordTransformDistance::m_dimensionsUsed
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().

◆ m_eigenvals

std::vector<double> Mantid::DataObjects::CoordTransformDistance::m_eigenvals
protected

Definition at line 67 of file CoordTransformDistance.h.

Referenced by apply(), and CoordTransformDistance().

◆ m_eigenvects

std::vector<Kernel::V3D> Mantid::DataObjects::CoordTransformDistance::m_eigenvects
protected

Definition at line 66 of file CoordTransformDistance.h.

Referenced by apply(), and CoordTransformDistance().

◆ m_maxEigenval

double Mantid::DataObjects::CoordTransformDistance::m_maxEigenval
protected

Definition at line 68 of file CoordTransformDistance.h.

Referenced by apply(), and CoordTransformDistance().


The documentation for this class was generated from the following files: