Chemical Data Processing Library C++ API - Version 1.4.0
Classes | Public Types | Public Member Functions | List of all members
CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T > Class Template Reference

Convenience wrapper around Math::KabschAlgorithm that operates directly on Math::VectorArray inputs. More...

#include <VectorArrayAlignmentCalculator.hpp>

+ Inheritance diagram for CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >:

Public Types

typedef VA VectorArrayType
 The vector-array type. More...
 
typedef V VectorType
 The vector element type of VectorArrayType. More...
 
typedef T ValueType
 The scalar value type. More...
 
typedef KabschAlgorithm< ValueType >::MatrixType MatrixType
 The matrix type used for the computed transformation. More...
 

Public Member Functions

template<typename VE >
bool calculate (const VectorArrayType &points, const VectorArrayType &ref_points, const VectorExpression< VE > &weights, bool do_center=true, std::size_t max_svd_iter=0)
 Aligns points onto ref_points (with per-point weights) using the Kabsch algorithm. More...
 
bool calculate (const VectorArrayType &points, const VectorArrayType &ref_points, bool do_center=true, std::size_t max_svd_iter=0)
 Aligns points onto ref_points (with uniform weights) using the Kabsch algorithm. More...
 
const MatrixTypegetTransform () const
 Returns the rigid-body transformation produced by the most recent successful calculate() call. More...
 

Detailed Description

template<typename VA, typename V = typename VA::ElementType, typename T = typename V::ValueType>
class CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >

Convenience wrapper around Math::KabschAlgorithm that operates directly on Math::VectorArray inputs.

Template Parameters
VAThe Math::VectorArray specialization type.
VThe vector element type of VA.
TThe scalar value type of V.

Member Typedef Documentation

◆ VectorArrayType

template<typename VA , typename V = typename VA::ElementType, typename T = typename V::ValueType>
typedef VA CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >::VectorArrayType

The vector-array type.

◆ VectorType

template<typename VA , typename V = typename VA::ElementType, typename T = typename V::ValueType>
typedef V CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >::VectorType

The vector element type of VectorArrayType.

◆ ValueType

template<typename VA , typename V = typename VA::ElementType, typename T = typename V::ValueType>
typedef T CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >::ValueType

The scalar value type.

◆ MatrixType

template<typename VA , typename V = typename VA::ElementType, typename T = typename V::ValueType>
typedef KabschAlgorithm<ValueType>::MatrixType CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >::MatrixType

The matrix type used for the computed transformation.

Member Function Documentation

◆ calculate() [1/2]

template<typename VA , typename V = typename VA::ElementType, typename T = typename V::ValueType>
template<typename VE >
bool CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >::calculate ( const VectorArrayType points,
const VectorArrayType ref_points,
const VectorExpression< VE > &  weights,
bool  do_center = true,
std::size_t  max_svd_iter = 0 
)
inline

Aligns points onto ref_points (with per-point weights) using the Kabsch algorithm.

Template Parameters
VEThe weight-vector expression type.
Parameters
pointsThe vector array containing the points to align.
ref_pointsThe vector array containing the reference points.
weightsThe per-point weights.
do_centerIf true, the point sets are centered before alignment.
max_svd_iterThe maximum number of iterations for the internal SVD step (0 means unlimited).
Returns
true if the SVD step converged, and false otherwise.

◆ calculate() [2/2]

template<typename VA , typename V = typename VA::ElementType, typename T = typename V::ValueType>
bool CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >::calculate ( const VectorArrayType points,
const VectorArrayType ref_points,
bool  do_center = true,
std::size_t  max_svd_iter = 0 
)
inline

Aligns points onto ref_points (with uniform weights) using the Kabsch algorithm.

Parameters
pointsThe vector array containing the points to align.
ref_pointsThe vector array containing the reference points.
do_centerIf true, the point sets are centered before alignment.
max_svd_iterThe maximum number of iterations for the internal SVD step (0 means unlimited).
Returns
true if the SVD step converged, and false otherwise.

◆ getTransform()

template<typename VA , typename V = typename VA::ElementType, typename T = typename V::ValueType>
const MatrixType& CDPL::Math::VectorArrayAlignmentCalculator< VA, V, T >::getTransform ( ) const
inline

Returns the rigid-body transformation produced by the most recent successful calculate() call.

Returns
A const reference to the homogeneous transformation matrix.

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