Rosetta  3.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
numeric::xyzMatrix< typename > Class Template Reference

xyzMatrix: Fast 3x3 xyz matrix template More...

#include <xyzMatrix.hh>

Public Types

typedefValue
 
typedef T & Reference
 
typedef T const & ConstReference
 
typedef T * Pointer
 
typedef T const * ConstPointer
 
typedef xyzVector< T > Vector
 
typedefvalue_type
 
typedef T & reference
 
typedef T const & const_reference
 
typedef T * pointer
 
typedef T const * const_pointer
 

Public Member Functions

 xyzMatrix ()
 Default constructor. More...
 
 xyzMatrix (xyzMatrix const &m)
 Copy constructor. More...
 
template<typename U >
 xyzMatrix (xyzMatrix< U > const &m)
 Copy constructor. More...
 
 xyzMatrix (Value const &t)
 Uniform value constructor. More...
 
 ~xyzMatrix ()
 Destructor. More...
 
template<typename U >
 xyzMatrix (ColsPointer< U > const &c)
 Pointer to contiguous column-ordered values constructor. More...
 
template<typename U >
 xyzMatrix (ColPointers< U > const &c)
 Pointers to contiguous columns constructor. More...
 
template<typename U >
 xyzMatrix (ColVectors< U > const &c)
 Columns constructor. More...
 
template<typename U >
 xyzMatrix (RowsPointer< U > const &r)
 Pointer to contiguous row-ordered values constructor. More...
 
template<typename U >
 xyzMatrix (RowPointers< U > const &r)
 Pointers to contiguous rows constructor. More...
 
template<typename U >
 xyzMatrix (RowVectors< U > const &r)
 Rows constructor. More...
 
xyzMatrixoperator= (xyzMatrix const &m)
 Copy assignment. More...
 
template<typename U >
xyzMatrixoperator= (xyzMatrix< U > const &m)
 Copy assignment. More...
 
template<typename U >
xyzMatrixoperator+= (xyzMatrix< U > const &m)
 += xyzMatrix More...
 
template<typename U >
xyzMatrixoperator-= (xyzMatrix< U > const &m)
 -= xyzMatrix More...
 
template<typename U >
xyzMatrixoperator*= (xyzMatrix< U > const &m)
 *= xyzMatrix More...
 
template<typename U >
xyzMatrixoperator= (ColsPointer< U > const &c)
 Assignment from pointer to contiguous column-ordered values. More...
 
template<typename U >
xyzMatrixoperator= (RowsPointer< U > const &r)
 Assignment from pointer to contiguous row-ordered values. More...
 
template<typename U >
xyzMatrixoperator= (ColPointers< U > const &c)
 Assignment from pointers to contiguous columns. More...
 
template<typename U >
xyzMatrixoperator= (RowPointers< U > const &r)
 Assignment from pointers to contiguous rows. More...
 
template<typename U >
xyzMatrixoperator= (ColVectors< U > const &c)
 xyzVector columns assignment More...
 
template<typename U >
xyzMatrixoperator= (RowVectors< U > const &r)
 xyzVector rows assignment More...
 
xyzMatrixoperator= (Value const &t)
 = Value More...
 
xyzMatrixoperator+= (Value const &t)
 += Value More...
 
xyzMatrixoperator-= (Value const &t)
 -= Value More...
 
xyzMatrixoperator*= (Value const &t)
 *= Value More...
 
xyzMatrixoperator/= (Value const &t)
 /= Value More...
 
xyzMatrixclear ()
 Clear. More...
 
xyzMatrixzero ()
 Set to the zero xyzMatrix. More...
 
xyzMatrixto_identity ()
 Set to the identity xyzMatrix. More...
 
xyzMatrixto_diag (Value const &xx_a, Value const &yy_a, Value const &zz_a)
 Set to diagonal xyzMatrix from value. More...
 
template<typename U >
xyzMatrixto_diag (xyzVector< U > const &diag_a)
 Set to diagonal xyzMatrix from xyzVector. More...
 
xyzMatrixset_diagonal (Value const &xx_a, Value const &yy_a, Value const &zz_a)
 set diagonal of xyzMatrix from value More...
 
template<typename U >
xyzMatrixset_diagonal (xyzVector< U > const &diag_a)
 Set diagonal of xyzMatrix from xyzVector. More...
 
xyzMatrixadd_diagonal (Value const &xx_a, Value const &yy_a, Value const &zz_a)
 Add values to diagonal of xyzMatrix. More...
 
template<typename U >
xyzMatrixadd_diagonal (xyzVector< U > const &diag_a)
 Add xyzVector to diagonal of xyzMatrix. More...
 
xyzMatrixsubtract_diagonal (Value const &xx_a, Value const &yy_a, Value const &zz_a)
 Subtract values from diagonal of xyzMatrix. More...
 
template<typename U >
xyzMatrixsubtract_diagonal (xyzVector< U > const &diag_a)
 Subtract xyzVector from diagonal of xyzMatrix. More...
 
xyzMatrixtranspose ()
 Transpose. More...
 
template<typename U >
xyzMatrixright_multiply_by (xyzMatrix< U > const &m)
 Right multiply by xyzMatrix. More...
 
template<typename U >
xyzMatrixright_multiply_by_transpose (xyzMatrix< U > const &m)
 Right multiply by transpose xyzMatrix. More...
 
template<typename U >
xyzMatrixleft_multiply_by (xyzMatrix< U > const &m)
 Left multiply by xyzMatrix. More...
 
template<typename U >
xyzMatrixleft_multiply_by_transpose (xyzMatrix< U > const &m)
 Left multiply by transpose xyzMatrix. More...
 
Vector col_x () const
 Column x. More...
 
xyzMatrixcol_x (Vector const &v)
 Column x assignment. More...
 
Vector col_y () const
 Column y. More...
 
xyzMatrixcol_y (Vector const &v)
 Column y assignment. More...
 
Vector col_z () const
 Column z. More...
 
xyzMatrixcol_z (Vector const &v)
 Column z assignment. More...
 
Vector col (int const i) const
 Column( i ): 1-based index. More...
 
xyzMatrixcol (int const i, Vector const &v)
 Column( i, xyzVector ) assignment: 1-base index. More...
 
Vector row_x () const
 Row x. More...
 
xyzMatrixrow_x (Vector const &v)
 Row x assignment. More...
 
Vector row_y () const
 Row y. More...
 
xyzMatrixrow_y (Vector const &v)
 Row y assignment. More...
 
Vector row_z () const
 Row z. More...
 
xyzMatrixrow_z (Vector const &v)
 Row z assignment. More...
 
Vector row (int const i) const
 Row ( i ): 1-based index. More...
 
xyzMatrixrow (int const i, Vector const &v)
 Row ( i, xyzVector ) assignment: 1-based index. More...
 
Value const & xx () const
 Value xx const. More...
 
Valuexx ()
 Value xx. More...
 
Value const & xy () const
 Value xy const. More...
 
Valuexy ()
 Value xy. More...
 
Value const & xz () const
 Value xz const. More...
 
Valuexz ()
 Value xz. More...
 
Value const & yx () const
 Value yx const. More...
 
Valueyx ()
 Value yx. More...
 
Value const & yy () const
 Value yy const. More...
 
Valueyy ()
 Value yy. More...
 
Value const & yz () const
 Value yz const. More...
 
Valueyz ()
 Value yz. More...
 
Value const & zx () const
 Value zx const. More...
 
Valuezx ()
 Value zx. More...
 
Value const & zy () const
 Value zy const. More...
 
Valuezy ()
 Value zy. More...
 
Value const & zz () const
 Value zz const. More...
 
Valuezz ()
 Value zz. More...
 
Value const & operator() (int const i, int const j) const
 xyzMatrix( i, j ) const: 1-based index More...
 
Valueoperator() (int const i, int const j)
 xyzMatrix( i, j ): 1-based index More...
 
void xx (Value const &xx_a)
 xx assignment More...
 
void xy (Value const &xy_a)
 xy assignment More...
 
void xz (Value const &xz_a)
 xz assignment More...
 
void yx (Value const &yx_a)
 yx assignment More...
 
void yy (Value const &yy_a)
 yy assignment More...
 
void yz (Value const &yz_a)
 yz assignment More...
 
void zx (Value const &zx_a)
 zx assignment More...
 
void zy (Value const &zy_a)
 zy assignment More...
 
void zz (Value const &zz_a)
 zz assignment More...
 
bool is_zero () const
 Is zero? More...
 
bool is_identity () const
 Is identity? More...
 
Value det () const
 Determinant. More...
 
Value trace () const
 Trace. More...
 
xyzMatrix transposed () const
 Transposed copy. More...
 
xyzMatrix< T > inverse () const
 
void show (std::ostream &output=std::cout) const
 Show. More...
 

Static Public Member Functions

static xyzMatrix cols (Value const &xx_a, Value const &yx_a, Value const &zx_a, Value const &xy_a, Value const &yy_a, Value const &zy_a, Value const &xz_a, Value const &yz_a, Value const &zz_a)
 Column-ordered value named constructor. More...
 
template<typename U >
static ColsPointer< U > cols (U const *cp)
 Pointer to contiguous column-ordered values named constructor/assignment. More...
 
template<typename U >
static ColPointers< U > cols (U const *xp, U const *yp, U const *zp)
 Pointers to contiguous columns named constructor/assignment. More...
 
template<typename U >
static xyzMatrix cols_constructor (U const *xp, U const *yp, U const *zp)
 Pointers to contiguous columns named constructor. More...
 
template<typename U >
static ColVectors< U > cols (xyzVector< U > const &col_x, xyzVector< U > const &col_y, xyzVector< U > const &col_z)
 Column vectors named constructor/assignment. More...
 
template<typename U >
static xyzMatrix cols_constructor (xyzVector< U > const &col_x, xyzVector< U > const &col_y, xyzVector< U > const &col_z)
 xyzVector columns named constructor More...
 
static xyzMatrix rows (Value const &xx_a, Value const &xy_a, Value const &xz_a, Value const &yx_a, Value const &yy_a, Value const &yz_a, Value const &zx_a, Value const &zy_a, Value const &zz_a)
 Row-ordered value named constructor. More...
 
template<typename U >
static RowsPointer< U > rows (U const *rp)
 Pointer to contiguous row-ordered values named constructor/assignment. More...
 
template<typename U >
static RowPointers< U > rows (U const *xp, U const *yp, U const *zp)
 Pointers to contiguous rows named constructor/assignment. More...
 
template<typename U >
static xyzMatrix rows_constructor (U const *xp, U const *yp, U const *zp)
 Pointers to contiguous rows named constructor. More...
 
template<typename U >
static RowVectors< U > rows (xyzVector< U > const &row_x, xyzVector< U > const &row_y, xyzVector< U > const &row_z)
 Row vectors named constructor/assignment. More...
 
template<typename U >
static xyzMatrix rows_constructor (xyzVector< U > const &row_x, xyzVector< U > const &row_y, xyzVector< U > const &row_z)
 xyzVector rows named constructor More...
 
static xyzMatrix diag (Value const &xx_a, Value const &yy_a, Value const &zz_a)
 Diagonal value named constructor. More...
 
template<typename U >
static xyzMatrix diag (xyzVector< U > const &diag_a)
 Diagonal xyzVector named constructor. More...
 
static xyzMatrix identity ()
 Identity xyzMatrix named constructor. More...
 
static xyzMatrix const & I ()
 Identity xyzMatrix for expressions. More...
 

Private Member Functions

 xyzMatrix (Value const &xx_a, Value const &xy_a, Value const &xz_a, Value const &yx_a, Value const &yy_a, Value const &yz_a, Value const &zx_a, Value const &zy_a, Value const &zz_a)
 Row-ordered value constructor. More...
 

Private Attributes

Value xx_
 Elements of the 3x3 matrix. More...
 
Value xy_
 
Value xz_
 
Value yx_
 
Value yy_
 
Value yz_
 
Value zx_
 
Value zy_
 
Value zz_
 

Friends

template<typename >
class xyzMatrix
 
xyzVector< T > operator* (xyzMatrix< T > const &m, xyzVector< T > const &v)
 xyzMatrix * xyzVector More...
 
xyzVector< T > product (xyzMatrix< T > const &m, xyzVector< T > const &v)
 xyzMatrix * xyzVector product More...
 
xyzVector< T > & inplace_product (xyzMatrix< T > const &m, xyzVector< T > &v)
 xyzMatrix * xyzVector in-place product More...
 
xyzVector< T > transpose_product (xyzMatrix< T > const &m, xyzVector< T > const &v)
 xyzMatrix^T * xyzVector product More...
 
xyzVector< T > & inplace_transpose_product (xyzMatrix< T > const &m, xyzVector< T > &v)
 xyzMatrix^T * xyzVector in-place transpose product More...
 
xyzMatrix< T > outer_product (xyzVector< T > const &a, xyzVector< T > const &b)
 xyzVector xyzVector outer product More...
 
xyzMatrix< T > projection_matrix (xyzVector< T > const &v)
 geometric center More...
 
xyzMatrix< T > rotation_matrix (xyzVector< T > const &axis, T const &theta)
 Rotation matrix for rotation about an axis by an angle in radians. More...
 
xyzVector< T > rotation_axis (xyzMatrix< T > const &R, T &theta)
 Transformation from rotation matrix to helical axis of rotation. More...
 
xyzVector< T > eigenvalue_jacobi (xyzMatrix< T > const &a, T const &tol)
 Classic Jacobi algorithm for the eigenvalues of a real symmetric matrix. More...
 
xyzVector< T > eigenvector_jacobi (xyzMatrix< T > const &a, T const &tol, xyzMatrix< T > &J)
 Classic Jacobi algorithm for the eigenvalues and eigenvectors of a real symmetric matrix. More...
 
xyzMatrix< T > inverse (xyzMatrix< T > const &a)
 
xyzMatrix operator+ (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix + xyzMatrix More...
 
xyzMatrix operator+ (xyzMatrix const &m, Value const &t)
 xyzMatrix + Value More...
 
xyzMatrix operator+ (Value const &t, xyzMatrix const &m)
 Value + xyzMatrix. More...
 
xyzMatrix operator- (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix - xyzMatrix More...
 
xyzMatrix operator- (xyzMatrix const &m, Value const &t)
 xyzMatrix - Value More...
 
xyzMatrix operator- (Value const &t, xyzMatrix const &m)
 Value - xyzMatrix. More...
 
xyzMatrix operator* (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix * xyzMatrix More...
 
xyzMatrix operator* (xyzMatrix const &m, Value const &t)
 xyzMatrix * Value More...
 
xyzMatrix operator* (Value const &t, xyzMatrix const &m)
 Value * xyzMatrix. More...
 
xyzMatrix operator/ (xyzMatrix const &m, Value const &t)
 xyzMatrix / Value More...
 
bool operator== (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix == xyzMatrix More...
 
bool operator!= (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix != xyzMatrix More...
 
bool operator< (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix < xyzMatrix More...
 
bool operator<= (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix <= xyzMatrix More...
 
bool operator>= (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix >= xyzMatrix More...
 
bool operator> (xyzMatrix const &a, xyzMatrix const &b)
 xyzMatrix > xyzMatrix More...
 
bool operator== (xyzMatrix const &m, Value const &t)
 xyzMatrix == Value More...
 
bool operator!= (xyzMatrix const &m, Value const &t)
 xyzMatrix != Value More...
 
bool operator< (xyzMatrix const &m, Value const &t)
 xyzMatrix < Value More...
 
bool operator<= (xyzMatrix const &m, Value const &t)
 xyzMatrix <= Value More...
 
bool operator>= (xyzMatrix const &m, Value const &t)
 xyzMatrix >= Value More...
 
bool operator> (xyzMatrix const &m, Value const &t)
 xyzMatrix > Value More...
 
bool operator== (Value const &t, xyzMatrix const &m)
 Value == xyzMatrix. More...
 
bool operator!= (Value const &t, xyzMatrix const &m)
 Value != xyzMatrix. More...
 
bool operator< (Value const &t, xyzMatrix const &m)
 Value < xyzMatrix. More...
 
bool operator<= (Value const &t, xyzMatrix const &m)
 Value <= xyzMatrix. More...
 
bool operator>= (Value const &t, xyzMatrix const &m)
 Value >= xyzMatrix. More...
 
bool operator> (Value const &t, xyzMatrix const &m)
 Value > xyzMatrix. More...
 

Detailed Description

template<typename>
class numeric::xyzMatrix< typename >

xyzMatrix: Fast 3x3 xyz matrix template

Member Typedef Documentation

template<typename >
typedef T const* numeric::xyzMatrix< typename >::const_pointer
template<typename >
typedef T const& numeric::xyzMatrix< typename >::const_reference
template<typename >
typedef T const* numeric::xyzMatrix< typename >::ConstPointer
template<typename >
typedef T const& numeric::xyzMatrix< typename >::ConstReference
template<typename >
typedef T* numeric::xyzMatrix< typename >::Pointer
template<typename >
typedef T* numeric::xyzMatrix< typename >::pointer
template<typename >
typedef T& numeric::xyzMatrix< typename >::Reference
template<typename >
typedef T& numeric::xyzMatrix< typename >::reference
template<typename >
typedef T numeric::xyzMatrix< typename >::Value
template<typename >
typedef T numeric::xyzMatrix< typename >::value_type
template<typename >
typedef xyzVector< T > numeric::xyzMatrix< typename >::Vector

Constructor & Destructor Documentation

template<typename >
numeric::xyzMatrix< typename >::xyzMatrix ( )
inline
template<typename >
numeric::xyzMatrix< typename >::xyzMatrix ( xyzMatrix< typename > const &  m)
inline

Copy constructor.

template<typename >
template<typename U >
numeric::xyzMatrix< typename >::xyzMatrix ( xyzMatrix< U > const &  m)
inline

Copy constructor.

template<typename >
numeric::xyzMatrix< typename >::xyzMatrix ( Value const &  t)
inlineexplicit

Uniform value constructor.

template<typename >
numeric::xyzMatrix< typename >::~xyzMatrix ( )
inline

Destructor.

template<typename >
template<typename U >
numeric::xyzMatrix< typename >::xyzMatrix ( ColsPointer< U > const &  c)
inline

Pointer to contiguous column-ordered values constructor.

See also
cols
Note
The cols named constructor/assignment provides a simple wrapper interface
Constructor usage: xyzMatrix m( xyzMatrix::cols( cols_pointer ) )
Assignment usage: m = xyzMatrix::cols( cols_pointer )
template<typename >
template<typename U >
numeric::xyzMatrix< typename >::xyzMatrix ( ColPointers< U > const &  c)
inline

Pointers to contiguous columns constructor.

See also
cols
Note
The cols named constructor/assignment provides a simple wrapper interface
Constructor usage: xyzMatrix m( xyzMatrix::cols( x_col_pointer, y_col_pointer, z_col_pointer ) )
Assignment usage: m = xyzMatrix::cols( x_col_pointer, y_col_pointer, z_col_pointer )
template<typename >
template<typename U >
numeric::xyzMatrix< typename >::xyzMatrix ( ColVectors< U > const &  c)
inline

Columns constructor.

See also
cols
Note
The cols named constructor/assignment provides a simple wrapper interface
Constructor usage: xyzMatrix m( xyzMatrix::cols( x_col_vector, y_col_vector, z_col_vector ) )
template<typename >
template<typename U >
numeric::xyzMatrix< typename >::xyzMatrix ( RowsPointer< U > const &  r)
inline

Pointer to contiguous row-ordered values constructor.

See also
rows
Note
The rows named constructor/assignment provides a simple wrapper interface
Constructor usage: xyzMatrix m( xyzMatrix::rows( rows_pointer ) )
Assignment usage: m = xyzMatrix::rows( rows_pointer )
template<typename >
template<typename U >
numeric::xyzMatrix< typename >::xyzMatrix ( RowPointers< U > const &  r)
inline

Pointers to contiguous rows constructor.

See also
rows
Note
The rows named constructor/assignment provides a simple wrapper interface
Constructor usage: xyzMatrix m( xyzMatrix::rows( x_row_pointer, y_row_pointer, z_row_pointer ) )
Assignment usage: m = xyzMatrix::rows( x_row_pointer, y_row_pointer, z_row_pointer )
template<typename >
template<typename U >
numeric::xyzMatrix< typename >::xyzMatrix ( RowVectors< U > const &  r)
inline

Rows constructor.

See also
rows
Note
The rows named constructor/assignment provides a simple wrapper interface
Constructor usage: xyzMatrix m( xyzMatrix::rows( x_row_vector, y_row_vector, z_row_vector ) )
template<typename >
numeric::xyzMatrix< typename >::xyzMatrix ( Value const &  xx_a,
Value const &  xy_a,
Value const &  xz_a,
Value const &  yx_a,
Value const &  yy_a,
Value const &  yz_a,
Value const &  zx_a,
Value const &  zy_a,
Value const &  zz_a 
)
inlineprivate

Row-ordered value constructor.

Note
Client code uses named constructors that specify the value order explicitly

Member Function Documentation

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::add_diagonal ( Value const &  xx_a,
Value const &  yy_a,
Value const &  zz_a 
)
inline

Add values to diagonal of xyzMatrix.

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::add_diagonal ( xyzVector< U > const &  diag_a)
inline

Add xyzVector to diagonal of xyzMatrix.

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::clear ( )
inline

Clear.

template<typename >
Vector numeric::xyzMatrix< typename >::col ( int const  i) const
inline
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::col ( int const  i,
Vector const &  v 
)
inline

Column( i, xyzVector ) assignment: 1-base index.

template<typename >
Vector numeric::xyzMatrix< typename >::col_x ( ) const
inline
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::col_x ( Vector const &  v)
inline

Column x assignment.

template<typename >
Vector numeric::xyzMatrix< typename >::col_y ( ) const
inline
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::col_y ( Vector const &  v)
inline

Column y assignment.

template<typename >
Vector numeric::xyzMatrix< typename >::col_z ( ) const
inline
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::col_z ( Vector const &  v)
inline

Column z assignment.

template<typename >
static xyzMatrix numeric::xyzMatrix< typename >::cols ( Value const &  xx_a,
Value const &  yx_a,
Value const &  zx_a,
Value const &  xy_a,
Value const &  yy_a,
Value const &  zy_a,
Value const &  xz_a,
Value const &  yz_a,
Value const &  zz_a 
)
inlinestatic

Column-ordered value named constructor.

Note
Constructor usage: xyzMatrix m( xyzMatrix::cols( xx_a, yx_a, zx_a, xy_a, yy_a, zy_a, xz_a, yz_a, zz_a ) )
Assignment usage: m = xyzMatrix::cols( xx_a, yx_a, zx_a, xy_a, yy_a, zy_a, xz_a, yz_a, zz_a )

Referenced by numeric::random::random_rotation(), basic::sampling::orientations::Quaternion::rotation_matrix(), and slice_ellipsoid_envelope().

template<typename >
template<typename U >
static ColsPointer< U > numeric::xyzMatrix< typename >::cols ( U const *  cp)
inlinestatic

Pointer to contiguous column-ordered values named constructor/assignment.

Warning
No way to check that argument points to nine contiguous values
Note
Constructor usage: xyzMatrix m( xyzMatrix::cols( cols_pointer ) )
Assignment usage: m = xyzMatrix::cols( cols_pointer )
template<typename >
template<typename U >
static ColPointers< U > numeric::xyzMatrix< typename >::cols ( U const *  xp,
U const *  yp,
U const *  zp 
)
inlinestatic

Pointers to contiguous columns named constructor/assignment.

Warning
No way to check that arguments each point to three contiguous values
Note
Constructor usage: xyzMatrix m( xyzMatrix::cols( x_col_pointer, y_col_pointer, z_col_pointer ) )
Assignment usage: m = xyzMatrix::cols( x_col_pointer, y_col_pointer, z_col_pointer )
template<typename >
template<typename U >
static ColVectors< U > numeric::xyzMatrix< typename >::cols ( xyzVector< U > const &  col_x,
xyzVector< U > const &  col_y,
xyzVector< U > const &  col_z 
)
inlinestatic

Column vectors named constructor/assignment.

Note
Constructor usage: xyzMatrix m( xyzMatrix::cols( x_col_vector, y_col_vector, z_col_vector ) )
Assignment usage: m = xyzMatrix::cols( x_col_vector, y_col_vector, z_col_vector )
template<typename >
template<typename U >
static xyzMatrix numeric::xyzMatrix< typename >::cols_constructor ( U const *  xp,
U const *  yp,
U const *  zp 
)
inlinestatic

Pointers to contiguous columns named constructor.

Warning
No way to check that arguments each point to three contiguous values
Note
Can be faster than cols() construction due to return value optimization
Constructor usage: xyzMatrix m( xyzMatrix::cols_constructor( x_col_pointer, y_col_pointer, z_col_pointer ) )
template<typename >
template<typename U >
static xyzMatrix numeric::xyzMatrix< typename >::cols_constructor ( xyzVector< U > const &  col_x,
xyzVector< U > const &  col_y,
xyzVector< U > const &  col_z 
)
inlinestatic

xyzVector columns named constructor

Note
Can be faster than cols() construction due to return value optimization
Constructor usage: xyzMatrix m( xyzMatrix::cols_constructor( x_col_vector, y_col_vector, z_col_vector ) )
template<typename >
Value numeric::xyzMatrix< typename >::det ( ) const
inline

Determinant.

Referenced by numeric::inverse().

template<typename >
static xyzMatrix numeric::xyzMatrix< typename >::diag ( Value const &  xx_a,
Value const &  yy_a,
Value const &  zz_a 
)
inlinestatic

Diagonal value named constructor.

Note
diag refers to a diagonal matrix
template<typename >
template<typename U >
static xyzMatrix numeric::xyzMatrix< typename >::diag ( xyzVector< U > const &  diag_a)
inlinestatic

Diagonal xyzVector named constructor.

Note
diag refers to a diagonal matrix
template<typename >
static xyzMatrix const& numeric::xyzMatrix< typename >::I ( )
inlinestatic

Identity xyzMatrix for expressions.

Note
identity() named constructor can be faster for construction
Returns reference to function-local static object so can be used in construction of global objects
template<typename >
static xyzMatrix numeric::xyzMatrix< typename >::identity ( )
inlinestatic

Identity xyzMatrix named constructor.

Note
Can be faster than I() for construction due to return value optimization

Referenced by numeric::alignVectorSets(), and numeric::fourier::SHT::idx_to_rot().

template<typename >
xyzMatrix< T > numeric::xyzMatrix< typename >::inverse ( ) const
inline
template<typename >
bool numeric::xyzMatrix< typename >::is_identity ( ) const
inline

Is identity?

template<typename >
bool numeric::xyzMatrix< typename >::is_zero ( ) const
inline

Is zero?

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::left_multiply_by ( xyzMatrix< U > const &  m)
inline

Left multiply by xyzMatrix.

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::left_multiply_by_transpose ( xyzMatrix< U > const &  m)
inline

Left multiply by transpose xyzMatrix.

Referenced by numeric::eigenvalue_jacobi(), and numeric::eigenvector_jacobi().

template<typename >
Value const& numeric::xyzMatrix< typename >::operator() ( int const  i,
int const  j 
) const
inline

xyzMatrix( i, j ) const: 1-based index

template<typename >
Value& numeric::xyzMatrix< typename >::operator() ( int const  i,
int const  j 
)
inline

xyzMatrix( i, j ): 1-based index

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator*= ( xyzMatrix< U > const &  m)
inline

*= xyzMatrix

Note
Same as right_multiply_by( xyzMatrix )
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::operator*= ( Value const &  t)
inline

*= Value

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator+= ( xyzMatrix< U > const &  m)
inline
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::operator+= ( Value const &  t)
inline

+= Value

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator-= ( xyzMatrix< U > const &  m)
inline
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::operator-= ( Value const &  t)
inline

-= Value

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::operator/= ( Value const &  t)
inline

/= Value

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( xyzMatrix< typename > const &  m)
inline

Copy assignment.

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( xyzMatrix< U > const &  m)
inline

Copy assignment.

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( ColsPointer< U > const &  c)
inline

Assignment from pointer to contiguous column-ordered values.

Note
Use via named assignment wrapper: m = xyzMatrix::cols( pointer )
template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( RowsPointer< U > const &  r)
inline

Assignment from pointer to contiguous row-ordered values.

Note
Use via named assignment wrapper: m = xyzMatrix::rows( pointer )
template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( ColPointers< U > const &  c)
inline

Assignment from pointers to contiguous columns.

Note
Use via named assignment wrapper: m = xyzMatrix::cols( pointer, pointer, pointer )
template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( RowPointers< U > const &  r)
inline

Assignment from pointers to contiguous rows.

Note
Use via named assignment wrapper: m = xyzMatrix::rows( pointer, pointer, pointer )
template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( ColVectors< U > const &  c)
inline

xyzVector columns assignment

Note
Use via named assignment wrapper: m = xyzMatrix::cols( xyzVector, xyzVector, xyzVector )
template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( RowVectors< U > const &  r)
inline

xyzVector rows assignment

Note
Use via named assignment wrapper: m = xyzMatrix::rows( xyzVector, xyzVector, xyzVector )
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::operator= ( Value const &  t)
inline

= Value

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::right_multiply_by ( xyzMatrix< U > const &  m)
inline

Right multiply by xyzMatrix.

Note
Same as *= xyzMatrix

Referenced by numeric::eigenvalue_jacobi(), and numeric::eigenvector_jacobi().

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::right_multiply_by_transpose ( xyzMatrix< U > const &  m)
inline

Right multiply by transpose xyzMatrix.

template<typename >
Vector numeric::xyzMatrix< typename >::row ( int const  i) const
inline

Row ( i ): 1-based index.

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::row ( int const  i,
Vector const &  v 
)
inline

Row ( i, xyzVector ) assignment: 1-based index.

template<typename >
Vector numeric::xyzMatrix< typename >::row_x ( ) const
inline

Row x.

Referenced by numeric::xyzMatrix< T >::rows().

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::row_x ( Vector const &  v)
inline

Row x assignment.

template<typename >
Vector numeric::xyzMatrix< typename >::row_y ( ) const
inline

Row y.

Referenced by numeric::xyzMatrix< T >::rows().

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::row_y ( Vector const &  v)
inline

Row y assignment.

template<typename >
Vector numeric::xyzMatrix< typename >::row_z ( ) const
inline

Row z.

Referenced by numeric::xyzMatrix< T >::rows().

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::row_z ( Vector const &  v)
inline

Row z assignment.

template<typename >
static xyzMatrix numeric::xyzMatrix< typename >::rows ( Value const &  xx_a,
Value const &  xy_a,
Value const &  xz_a,
Value const &  yx_a,
Value const &  yy_a,
Value const &  yz_a,
Value const &  zx_a,
Value const &  zy_a,
Value const &  zz_a 
)
inlinestatic

Row-ordered value named constructor.

Note
Constructor usage: xyzMatrix m( xyzMatrix::rows( xx_a, xy_a, xz_a, yx_a, yy_a, yz_a, zx_a, zy_a, zz_a ) )
Assignment usage: m = xyzMatrix::rows( xx_a, xy_a, xz_a, yx_a, yy_a, yz_a, zx_a, zy_a, zz_a )

Referenced by numeric::urs_Quat::asR(), numeric::FArray_to_xyzmatrix(), numeric::UniformRotationSampler::get(), numeric::x_rotation_matrix(), numeric::y_rotation_matrix(), and numeric::z_rotation_matrix().

template<typename >
template<typename U >
static RowsPointer< U > numeric::xyzMatrix< typename >::rows ( U const *  rp)
inlinestatic

Pointer to contiguous row-ordered values named constructor/assignment.

Warning
No way to check that argument points to nine contiguous values
Note
Constructor usage: xyzMatrix m( xyzMatrix::rows( rows_pointer ) )
Assignment usage: m = xyzMatrix::rows( rows_pointer )
template<typename >
template<typename U >
static RowPointers< U > numeric::xyzMatrix< typename >::rows ( U const *  xp,
U const *  yp,
U const *  zp 
)
inlinestatic

Pointers to contiguous rows named constructor/assignment.

Warning
No way to check that arguments each point to three contiguous values
Note
Constructor usage: xyzMatrix m( xyzMatrix::rows( x_row_pointer, y_row_pointer, z_row_pointer ) )
Assignment usage: m = xyzMatrix::rows( x_row_pointer, y_row_pointer, z_row_pointer )
template<typename >
template<typename U >
static RowVectors< U > numeric::xyzMatrix< typename >::rows ( xyzVector< U > const &  row_x,
xyzVector< U > const &  row_y,
xyzVector< U > const &  row_z 
)
inlinestatic

Row vectors named constructor/assignment.

Note
Constructor usage: xyzMatrix m( xyzMatrix::rows( x_row_vector, y_row_vector, z_row_vector ) )
Assignment usage: m = xyzMatrix::rows( x_row_vector, y_row_vector, z_row_vector )
template<typename >
template<typename U >
static xyzMatrix numeric::xyzMatrix< typename >::rows_constructor ( U const *  xp,
U const *  yp,
U const *  zp 
)
inlinestatic

Pointers to contiguous rows named constructor.

Warning
No way to check that arguments each point to three contiguous values
Note
Can be faster than rows() construction due to return value optimization
Constructor usage: xyzMatrix m( xyzMatrix::rows_constructor( x_row_pointer, y_row_pointer, z_row_pointer ) )

Referenced by numeric::HomogeneousTransform< double >::rotation_matrix().

template<typename >
template<typename U >
static xyzMatrix numeric::xyzMatrix< typename >::rows_constructor ( xyzVector< U > const &  row_x,
xyzVector< U > const &  row_y,
xyzVector< U > const &  row_z 
)
inlinestatic

xyzVector rows named constructor

Note
Can be faster than rows() construction due to return value optimization
Constructor usage: xyzMatrix m( xyzMatrix::rows_constructor( x_row_vector, y_row_vector, z_row_vector ) )
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::set_diagonal ( Value const &  xx_a,
Value const &  yy_a,
Value const &  zz_a 
)
inline

set diagonal of xyzMatrix from value

Note
Resets the diagonal of the matrix only (diagonal refers to diagonal entries of a matrix)
template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::set_diagonal ( xyzVector< U > const &  diag_a)
inline

Set diagonal of xyzMatrix from xyzVector.

Note
Resets the diagonal of the matrix only (diagonal refers to diagonal
template<typename >
void numeric::xyzMatrix< typename >::show ( std::ostream &  output = std::cout) const
inline

Show.

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::subtract_diagonal ( Value const &  xx_a,
Value const &  yy_a,
Value const &  zz_a 
)
inline

Subtract values from diagonal of xyzMatrix.

template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::subtract_diagonal ( xyzVector< U > const &  diag_a)
inline

Subtract xyzVector from diagonal of xyzMatrix.

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::to_diag ( Value const &  xx_a,
Value const &  yy_a,
Value const &  zz_a 
)
inline

Set to diagonal xyzMatrix from value.

Note
Resets the entire matrix (diag refers to a diagonal matrix)
template<typename >
template<typename U >
xyzMatrix& numeric::xyzMatrix< typename >::to_diag ( xyzVector< U > const &  diag_a)
inline

Set to diagonal xyzMatrix from xyzVector.

Note
Resets the entire matrix (diag refers to a diagonal matrix)
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::to_identity ( )
inline
template<typename >
Value numeric::xyzMatrix< typename >::trace ( ) const
inline
template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::transpose ( )
inline
template<typename >
xyzMatrix numeric::xyzMatrix< typename >::transposed ( ) const
inline
template<typename >
Value const& numeric::xyzMatrix< typename >::xx ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::xx ( )
inline

Value xx.

template<typename >
void numeric::xyzMatrix< typename >::xx ( Value const &  xx_a)
inline

xx assignment

template<typename >
Value const& numeric::xyzMatrix< typename >::xy ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::xy ( )
inline

Value xy.

template<typename >
void numeric::xyzMatrix< typename >::xy ( Value const &  xy_a)
inline

xy assignment

template<typename >
Value const& numeric::xyzMatrix< typename >::xz ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::xz ( )
inline

Value xz.

template<typename >
void numeric::xyzMatrix< typename >::xz ( Value const &  xz_a)
inline

xz assignment

template<typename >
Value const& numeric::xyzMatrix< typename >::yx ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::yx ( )
inline

Value yx.

template<typename >
void numeric::xyzMatrix< typename >::yx ( Value const &  yx_a)
inline

yx assignment

template<typename >
Value const& numeric::xyzMatrix< typename >::yy ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::yy ( )
inline

Value yy.

template<typename >
void numeric::xyzMatrix< typename >::yy ( Value const &  yy_a)
inline

yy assignment

template<typename >
Value const& numeric::xyzMatrix< typename >::yz ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::yz ( )
inline

Value yz.

template<typename >
void numeric::xyzMatrix< typename >::yz ( Value const &  yz_a)
inline

yz assignment

template<typename >
xyzMatrix& numeric::xyzMatrix< typename >::zero ( )
inline
template<typename >
Value const& numeric::xyzMatrix< typename >::zx ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::zx ( )
inline

Value zx.

template<typename >
void numeric::xyzMatrix< typename >::zx ( Value const &  zx_a)
inline

zx assignment

template<typename >
Value const& numeric::xyzMatrix< typename >::zy ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::zy ( )
inline

Value zy.

template<typename >
void numeric::xyzMatrix< typename >::zy ( Value const &  zy_a)
inline

zy assignment

template<typename >
Value const& numeric::xyzMatrix< typename >::zz ( ) const
inline
template<typename >
Value& numeric::xyzMatrix< typename >::zz ( )
inline

Value zz.

template<typename >
void numeric::xyzMatrix< typename >::zz ( Value const &  zz_a)
inline

zz assignment

Friends And Related Function Documentation

template<typename >
xyzVector< T > eigenvalue_jacobi ( xyzMatrix< T > const &  a,
T const &  tol 
)
friend

Classic Jacobi algorithm for the eigenvalues of a real symmetric matrix.

Note
Use eigenvector_jacobi if eigenvectors are also desired
template<typename >
xyzVector< T > eigenvector_jacobi ( xyzMatrix< T > const &  a,
T const &  tol,
xyzMatrix< T > &  J 
)
friend

Classic Jacobi algorithm for the eigenvalues and eigenvectors of a real symmetric matrix.

Note
Use eigenvalue_jacobi if eigenvectors are not desired
template<typename >
xyzVector< T >& inplace_product ( xyzMatrix< T > const &  m,
xyzVector< T > &  v 
)
friend

xyzMatrix * xyzVector in-place product

Note
Input xyzVector is modified
template<typename >
xyzVector< T >& inplace_transpose_product ( xyzMatrix< T > const &  m,
xyzVector< T > &  v 
)
friend

xyzMatrix^T * xyzVector in-place transpose product

Note
Input xyzVector is modified
template<typename >
xyzMatrix< T > inverse ( xyzMatrix< T > const &  a)
friend
template<typename >
bool operator!= ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
bool operator!= ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix != Value

template<typename >
bool operator!= ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value != xyzMatrix.

template<typename >
xyzVector< T > operator* ( xyzMatrix< T > const &  m,
xyzVector< T > const &  v 
)
friend

xyzMatrix * xyzVector

Note
Same as product( xyzMatrix, xyzVector )
template<typename >
xyzMatrix operator* ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
xyzMatrix operator* ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix * Value

template<typename >
xyzMatrix operator* ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value * xyzMatrix.

template<typename >
xyzMatrix operator+ ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
xyzMatrix operator+ ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix + Value

template<typename >
xyzMatrix operator+ ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value + xyzMatrix.

template<typename >
xyzMatrix operator- ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
xyzMatrix operator- ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix - Value

template<typename >
xyzMatrix operator- ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value - xyzMatrix.

template<typename >
xyzMatrix operator/ ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix / Value

template<typename >
bool operator< ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
bool operator< ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix < Value

template<typename >
bool operator< ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value < xyzMatrix.

template<typename >
bool operator<= ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
bool operator<= ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix <= Value

template<typename >
bool operator<= ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value <= xyzMatrix.

template<typename >
bool operator== ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
bool operator== ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix == Value

template<typename >
bool operator== ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value == xyzMatrix.

template<typename >
bool operator> ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
bool operator> ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix > Value

template<typename >
bool operator> ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value > xyzMatrix.

template<typename >
bool operator>= ( xyzMatrix< typename > const &  a,
xyzMatrix< typename > const &  b 
)
friend
template<typename >
bool operator>= ( xyzMatrix< typename > const &  m,
Value const &  t 
)
friend

xyzMatrix >= Value

template<typename >
bool operator>= ( Value const &  t,
xyzMatrix< typename > const &  m 
)
friend

Value >= xyzMatrix.

template<typename >
xyzMatrix< T > outer_product ( xyzVector< T > const &  a,
xyzVector< T > const &  b 
)
friend

xyzVector xyzVector outer product

template<typename >
xyzVector< T > product ( xyzMatrix< T > const &  m,
xyzVector< T > const &  v 
)
friend

xyzMatrix * xyzVector product

Note
Same as xyzMatrix * xyzVector
template<typename >
xyzMatrix< T > projection_matrix ( xyzVector< T > const &  v)
friend

geometric center

Note
compute the geometric center of a list of points Projection matrix onto the line through a vector
template<typename >
xyzVector< T > rotation_axis ( xyzMatrix< T > const &  R,
T &  theta 
)
friend

Transformation from rotation matrix to helical axis of rotation.

Note
Input matrix must be orthogonal
Angle of rotation is also returned
Orientation of axis chosen so that the angle of rotation is non-negative [0,pi]
template<typename >
xyzMatrix< T > rotation_matrix ( xyzVector< T > const &  axis,
T const &  theta 
)
friend

Rotation matrix for rotation about an axis by an angle in radians.

template<typename >
xyzVector< T > transpose_product ( xyzMatrix< T > const &  m,
xyzVector< T > const &  v 
)
friend

xyzMatrix^T * xyzVector product

template<typename >
template<typename >
friend class xyzMatrix
friend

Member Data Documentation

template<typename >
Value numeric::xyzMatrix< typename >::xx_
private
template<typename >
Value numeric::xyzMatrix< typename >::xy_
private
template<typename >
Value numeric::xyzMatrix< typename >::xz_
private
template<typename >
Value numeric::xyzMatrix< typename >::yx_
private
template<typename >
Value numeric::xyzMatrix< typename >::yy_
private
template<typename >
Value numeric::xyzMatrix< typename >::yz_
private
template<typename >
Value numeric::xyzMatrix< typename >::zx_
private
template<typename >
Value numeric::xyzMatrix< typename >::zy_
private
template<typename >
Value numeric::xyzMatrix< typename >::zz_
private

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