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. | |
operator vnl_matrix< double > () const | |
Noisily convert a vnl_transpose to a matrix. | |
vnl_matrix< double > | asMatrix () const |
Quietly convert a vnl_transpose to a matrix. | |
vnl_matrix< double > | operator* (const vnl_matrix< double > &O) |
Return M' * O. | |
vnl_vector< double > | operator* (const vnl_vector< double > &O) |
Return M' * O. | |
Private Attributes | |
const vnl_matrix< double > & | M_ |
Friends | |
vnl_matrix< double > | operator* (const vnl_matrix< double > &A, const vnl_transpose &B) |
Return A * B'. |
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 37 of file vnl_transpose.h.
vnl_transpose::vnl_transpose | ( | const vnl_matrix< double > & | M | ) | [inline] |
Make a vnl_transpose object referring to matrix M.
Definition at line 43 of file vnl_transpose.h.
vnl_matrix<double> vnl_transpose::asMatrix | ( | ) | const [inline] |
Quietly convert a vnl_transpose to a matrix.
Definition at line 52 of file vnl_transpose.h.
vnl_transpose::operator vnl_matrix< double > | ( | ) | const [inline] |
Noisily convert a vnl_transpose to a matrix.
Definition at line 46 of file vnl_transpose.h.
vnl_matrix<double> vnl_transpose::operator* | ( | const vnl_matrix< double > & | O | ) | [inline] |
Return M' * O.
Definition at line 55 of file vnl_transpose.h.
vnl_vector<double> vnl_transpose::operator* | ( | const vnl_vector< double > & | O | ) | [inline] |
Return M' * O.
Definition at line 62 of file vnl_transpose.h.
vnl_matrix<double> operator* | ( | const vnl_matrix< double > & | A, |
const vnl_transpose & | B | ||
) | [friend] |
Return A * B'.
Definition at line 69 of file vnl_transpose.h.
const vnl_matrix<double>& vnl_transpose::M_ [private] |
Definition at line 39 of file vnl_transpose.h.