Public Member Functions | Private Attributes | Friends | List of all members
vnl_transpose Class Reference

Efficient matrix transpose. More...

#include <vnl_transpose.h>

Public Member Functions

 vnl_transpose (const vnl_matrix< double > &M)
 Make a vnl_transpose object referring to matrix M. More...
 
 operator vnl_matrix< double > () const
 Noisily convert a vnl_transpose to a matrix. More...
 
vnl_matrix< double > asMatrix () const
 Quietly convert a vnl_transpose to a matrix. More...
 
vnl_matrix< double > operator * (const vnl_matrix< double > &O)
 Return M' * O. More...
 
vnl_vector< double > operator * (const vnl_vector< double > &O)
 Return M' * O. More...
 

Private Attributes

const vnl_matrix< double > & M_
 

Friends

vnl_matrix< double > operator * (const vnl_matrix< double > &A, const vnl_transpose &B)
 Return A * B'. More...
 

Detailed Description

Efficient matrix transpose.

vnl_transpose is an efficient way to write C = vnl_transpose(A) * B. The vnl_transpose class holds a reference to the original matrix and when involved in an operation for which it has been specialized, performs the operation without copying.

If the operation has not been specialized, the vnl_transpose performs a copying conversion to a matrix, printing a message to stdout. At that stage, the user may choose to implement the particular operation or use vnl_transpose::asMatrix() to clear the warning.

NOTE: This is a reference class, so should be shorter-lived than the matrix to which it refers.

NOTE: This only works for arguments of type vnl_matrix<double>

Definition at line 38 of file vnl_transpose.h.

Constructor & Destructor Documentation

◆ vnl_transpose()

vnl_transpose::vnl_transpose ( const vnl_matrix< double > &  M)
inline

Make a vnl_transpose object referring to matrix M.

Definition at line 44 of file vnl_transpose.h.

Member Function Documentation

◆ asMatrix()

vnl_matrix<double> vnl_transpose::asMatrix ( ) const
inline

Quietly convert a vnl_transpose to a matrix.

Definition at line 53 of file vnl_transpose.h.

◆ operator *() [1/2]

vnl_matrix<double> vnl_transpose::operator * ( const vnl_matrix< double > &  O)
inline

Return M' * O.

Definition at line 56 of file vnl_transpose.h.

◆ operator *() [2/2]

vnl_vector<double> vnl_transpose::operator * ( const vnl_vector< double > &  O)
inline

Return M' * O.

Definition at line 63 of file vnl_transpose.h.

◆ operator vnl_matrix< double >()

vnl_transpose::operator vnl_matrix< double > ( ) const
inline

Noisily convert a vnl_transpose to a matrix.

Definition at line 47 of file vnl_transpose.h.

Friends And Related Function Documentation

◆ operator *

vnl_matrix<double> operator * ( const vnl_matrix< double > &  A,
const vnl_transpose B 
)
friend

Return A * B'.

Definition at line 70 of file vnl_transpose.h.

Member Data Documentation

◆ M_

const vnl_matrix<double>& vnl_transpose::M_
private

Definition at line 40 of file vnl_transpose.h.


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