Various specialised versions of matrix product operations. More...
#include "mbl_matrix_products.h"
#include <vnl/vnl_vector.h>
#include <vnl/vnl_matrix.h>
#include <vcl_cassert.h>
#include <vcl_cstdlib.h>
#include <vcl_iostream.h>
Go to the source code of this file.
Functions | |
void | mbl_matrix_product (vnl_matrix< double > &AB, const vnl_matrix< double > &A, const vnl_matrix< double > &B) |
Compute product AB = A * B. | |
void | mbl_matrix_product_a_bt (vnl_matrix< double > &ABt, const vnl_matrix< double > &A, const vnl_matrix< double > &B) |
Compute product ABt = A * B.transpose(). | |
void | mbl_matrix_product_a_bt (vnl_matrix< double > &ABt, const vnl_matrix< double > &A, const vnl_matrix< double > &B, int nc) |
Compute product ABt = A * B.transpose(), using only nc cols of A and B. | |
void | mbl_matrix_product_at_b (vnl_matrix< double > &AtB, const vnl_matrix< double > &A, const vnl_matrix< double > &B) |
Compute product AtB = A.transpose() * B. | |
void | mbl_matrix_product_a_at (vnl_matrix< double > &AAt, const vnl_matrix< double > &A, unsigned nr, unsigned nc) |
Compute AAt = A * A.transpose(), using only first nr x nc partition of A. | |
void | mbl_matrix_product_a_at (vnl_matrix< double > &AAt, const vnl_matrix< double > &A) |
Compute product AAt = A * A.transpose(). | |
void | mbl_matrix_product_at_b (vnl_matrix< double > &AtB, const vnl_matrix< double > &A, const vnl_matrix< double > &B, int nc_a) |
Compute product AtB = A.transpose() * B, using nc_a cols of A. | |
void | mbl_matrix_product_at_a (vnl_matrix< double > &AtA, const vnl_matrix< double > &A, unsigned nc) |
Compute product AtA = A.transpose() * A using nc cols of A. | |
void | mbl_matrix_product_at_a (vnl_matrix< double > &AtA, const vnl_matrix< double > &A) |
Compute product AtA = A.transpose() * A. | |
void | mbl_matrix_product_adb (vnl_matrix< double > &ADB, const vnl_matrix< double > &A, const vnl_vector< double > &d, const vnl_matrix< double > &B) |
Returns ADB = A * D * B. |
Various specialised versions of matrix product operations.
Definition in file mbl_matrix_products.cxx.
void mbl_matrix_product | ( | vnl_matrix< double > & | AB, |
const vnl_matrix< double > & | A, | ||
const vnl_matrix< double > & | B | ||
) |
Compute product AB = A * B.
Definition at line 16 of file mbl_matrix_products.cxx.
void mbl_matrix_product_a_at | ( | vnl_matrix< double > & | AAt, |
const vnl_matrix< double > & | A, | ||
unsigned | nr, | ||
unsigned | nc | ||
) |
Compute AAt = A * A.transpose(), using only first nr x nc partition of A.
Uses symmetry of result to improve speed
Definition at line 122 of file mbl_matrix_products.cxx.
void mbl_matrix_product_a_at | ( | vnl_matrix< double > & | AAt, |
const vnl_matrix< double > & | A | ||
) |
Compute product AAt = A * A.transpose().
Compute AAt = A * A.transpose().
Uses symmetry of result to be approx twice as fast as mbl_matrix_product_a_bt(AAt,A,A)
Definition at line 157 of file mbl_matrix_products.cxx.
void mbl_matrix_product_a_bt | ( | vnl_matrix< double > & | ABt, |
const vnl_matrix< double > & | A, | ||
const vnl_matrix< double > & | B | ||
) |
Compute product ABt = A * B.transpose().
NDEBUG
Definition at line 61 of file mbl_matrix_products.cxx.
void mbl_matrix_product_a_bt | ( | vnl_matrix< double > & | ABt, |
const vnl_matrix< double > & | A, | ||
const vnl_matrix< double > & | B, | ||
int | nc | ||
) |
Compute product ABt = A * B.transpose(), using only nc cols of A and B.
Compute ABt = A * B.transpose() using only first n_cols columns of A and B.
Definition at line 80 of file mbl_matrix_products.cxx.
void mbl_matrix_product_adb | ( | vnl_matrix< double > & | ADB, |
const vnl_matrix< double > & | A, | ||
const vnl_vector< double > & | d, | ||
const vnl_matrix< double > & | B | ||
) |
Returns ADB = A * D * B.
ADB = A * D * B where D is diagonal with elements d.
where D is diagonal with elements d
Definition at line 254 of file mbl_matrix_products.cxx.
void mbl_matrix_product_at_a | ( | vnl_matrix< double > & | AtA, |
const vnl_matrix< double > & | A, | ||
unsigned | nc | ||
) |
Compute product AtA = A.transpose() * A using nc cols of A.
Definition at line 211 of file mbl_matrix_products.cxx.
void mbl_matrix_product_at_a | ( | vnl_matrix< double > & | AtA, |
const vnl_matrix< double > & | A | ||
) |
Compute product AtA = A.transpose() * A.
Definition at line 246 of file mbl_matrix_products.cxx.
void mbl_matrix_product_at_b | ( | vnl_matrix< double > & | AtB, |
const vnl_matrix< double > & | A, | ||
const vnl_matrix< double > & | B | ||
) |
Compute product AtB = A.transpose() * B.
Result is of size A.cols() x B.cols()
Definition at line 112 of file mbl_matrix_products.cxx.
void mbl_matrix_product_at_b | ( | vnl_matrix< double > & | AtB, |
const vnl_matrix< double > & | A, | ||
const vnl_matrix< double > & | B, | ||
int | nc_a | ||
) |
Compute product AtB = A.transpose() * B, using nc_a cols of A.
Compute AtB = A.transpose() * B , using first ncols_a cols of A.
Definition at line 164 of file mbl_matrix_products.cxx.