Mantid
|
Type to wrap an affine matrix and allow serialization via xml. More...
#include <AffineMatrixParameter.h>
Public Member Functions | |
AffineMatrixParameter (const AffineMatrixParameter &) | |
Copy constructor. More... | |
AffineMatrixParameter (size_t outD, size_t inD) | |
Constructor. More... | |
AffineMatrixParameter * | clone () const override |
Clone the parameter. More... | |
AffineMatrixType | getAffineMatrix () const |
Gets copy of internal affine matrix. More... | |
std::string | getName () const override |
Get the name of the parameter. More... | |
coord_t ** | getRawMatrix () |
Get the matrix in its raw array form. More... | |
bool | isValid () const override |
Getter for the valid status. More... | |
AffineMatrixParameter & | operator= (const AffineMatrixParameter &other) |
Assignment operator. More... | |
void | setMatrix (const AffineMatrixType &newMatrix) |
Setter for the internal affine matrix. More... | |
std::string | toXMLString () const override |
Serialize the Affine Matrix Parameter. More... | |
~AffineMatrixParameter () override | |
Destructor. More... | |
Public Member Functions inherited from Mantid::API::ImplicitFunctionParameter | |
virtual ImplicitFunctionParameter * | clone () const =0 |
virtual std::string | getName () const =0 |
virtual bool | isValid () const =0 |
virtual std::string | toXMLString () const =0 |
virtual | ~ImplicitFunctionParameter ()=default |
Static Public Member Functions | |
static std::string | parameterName () |
Gets the type parameter name. More... | |
Private Member Functions | |
void | copyRawMatrix () |
Copy elements from affinematrix into raw array. More... | |
Private Attributes | |
AffineMatrixType | m_affineMatrix |
Affine matrix. More... | |
coord_t ** | m_rawMatrix |
Raw matrix used for speed (array of pointers to columns). More... | |
coord_t * | m_rawMem |
pointer to large memory block (matrix) More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::API::ImplicitFunctionParameter | |
std::string | parameterXMLTemplate (const std::string &valueXMLtext) const |
Protected Attributes inherited from Mantid::API::ImplicitFunctionParameter | |
bool | m_isValid {false} |
Type to wrap an affine matrix and allow serialization via xml.
Definition at line 24 of file AffineMatrixParameter.h.
Mantid::DataObjects::AffineMatrixParameter::AffineMatrixParameter | ( | size_t | outD, |
size_t | inD | ||
) |
Constructor.
outD | the number of output dimensions |
inD | the nubmer of input dimensions |
Definition at line 17 of file AffineMatrixParameter.cpp.
References copyRawMatrix(), Mantid::Kernel::Matrix< T >::identityMatrix(), m_affineMatrix, Mantid::API::ImplicitFunctionParameter::m_isValid, m_rawMatrix, m_rawMem, Mantid::Kernel::Matrix< T >::numCols(), and Mantid::Kernel::Matrix< T >::numRows().
Mantid::DataObjects::AffineMatrixParameter::AffineMatrixParameter | ( | const AffineMatrixParameter & | other | ) |
Copy constructor.
other | : another affine matrix to copy from. |
Definition at line 141 of file AffineMatrixParameter.cpp.
References copyRawMatrix(), m_affineMatrix, Mantid::API::ImplicitFunctionParameter::m_isValid, m_rawMatrix, m_rawMem, Mantid::Kernel::Matrix< T >::numCols(), and Mantid::Kernel::Matrix< T >::numRows().
|
override |
Destructor.
Definition at line 34 of file AffineMatrixParameter.cpp.
References m_rawMatrix, and m_rawMem.
|
overridevirtual |
Clone the parameter.
Implements Mantid::API::ImplicitFunctionParameter.
Definition at line 105 of file AffineMatrixParameter.cpp.
References m_affineMatrix, Mantid::Kernel::Matrix< T >::numCols(), and Mantid::Kernel::Matrix< T >::numRows().
|
private |
Copy elements from affinematrix into raw array.
Definition at line 46 of file AffineMatrixParameter.cpp.
References m_affineMatrix, m_rawMatrix, Mantid::Kernel::Matrix< T >::numCols(), Mantid::Kernel::Matrix< T >::numRows(), Mantid::Geometry::x, and Mantid::Geometry::y.
Referenced by AffineMatrixParameter(), operator=(), and setMatrix().
AffineMatrixType Mantid::DataObjects::AffineMatrixParameter::getAffineMatrix | ( | ) | const |
Gets copy of internal affine matrix.
Definition at line 57 of file AffineMatrixParameter.cpp.
References m_affineMatrix.
|
overridevirtual |
Get the name of the parameter.
Implements Mantid::API::ImplicitFunctionParameter.
Definition at line 71 of file AffineMatrixParameter.cpp.
References parameterName().
coord_t ** Mantid::DataObjects::AffineMatrixParameter::getRawMatrix | ( | ) |
Get the matrix in its raw array form.
Definition at line 64 of file AffineMatrixParameter.cpp.
References m_rawMatrix.
|
overridevirtual |
Getter for the valid status.
Implements Mantid::API::ImplicitFunctionParameter.
Definition at line 114 of file AffineMatrixParameter.cpp.
References Mantid::API::ImplicitFunctionParameter::m_isValid.
AffineMatrixParameter & Mantid::DataObjects::AffineMatrixParameter::operator= | ( | const AffineMatrixParameter & | other | ) |
Assignment operator.
other | : another affine matrix to assign from. |
Definition at line 122 of file AffineMatrixParameter.cpp.
References copyRawMatrix(), m_affineMatrix, and Mantid::API::ImplicitFunctionParameter::m_isValid.
|
inlinestatic |
Gets the type parameter name.
Definition at line 44 of file AffineMatrixParameter.h.
Referenced by Mantid::DataObjects::AffineMatrixParameterParser::createParameter(), and getName().
void Mantid::DataObjects::AffineMatrixParameter::setMatrix | ( | const AffineMatrixType & | newMatrix | ) |
Setter for the internal affine matrix.
newMatrix | : new matrix to use. |
Definition at line 158 of file AffineMatrixParameter.cpp.
References copyRawMatrix(), m_affineMatrix, Mantid::API::ImplicitFunctionParameter::m_isValid, Mantid::Kernel::Matrix< T >::numCols(), and Mantid::Kernel::Matrix< T >::numRows().
Referenced by Mantid::DataObjects::CoordTransformAffine::toXMLString().
|
overridevirtual |
Serialize the Affine Matrix Parameter.
Implements Mantid::API::ImplicitFunctionParameter.
Definition at line 78 of file AffineMatrixParameter.cpp.
References Mantid::Kernel::Matrix< T >::getVector(), m_affineMatrix, Mantid::Kernel::Matrix< T >::numCols(), and Mantid::API::ImplicitFunctionParameter::parameterXMLTemplate().
Referenced by Mantid::DataObjects::CoordTransformAffine::toXMLString().
|
private |
Affine matrix.
Definition at line 55 of file AffineMatrixParameter.h.
Referenced by AffineMatrixParameter(), clone(), copyRawMatrix(), getAffineMatrix(), operator=(), setMatrix(), and toXMLString().
|
private |
Raw matrix used for speed (array of pointers to columns).
Definition at line 50 of file AffineMatrixParameter.h.
Referenced by AffineMatrixParameter(), copyRawMatrix(), getRawMatrix(), and ~AffineMatrixParameter().
|
private |
pointer to large memory block (matrix)
Definition at line 52 of file AffineMatrixParameter.h.
Referenced by AffineMatrixParameter(), and ~AffineMatrixParameter().