Functions
contrib/mul/mbl/mbl_matxvec.cxx File Reference

Various specialised versions of simple linear algebra operators. More...

#include "mbl_matxvec.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_matxvec_prod_mv (const vnl_matrix< double > &M, const vnl_vector< double > &V, vnl_vector< double > &R)
 Compute R = M*V.
void mbl_matxvec_prod_mv_2 (const vnl_matrix< double > &M, const vnl_vector< double > &V, vnl_vector< double > &R)
 Compute R = M*V.
void mbl_matxvec_prod_vm (const vnl_vector< double > &V, const vnl_matrix< double > &M, vnl_vector< double > &R)
 Fast Compute R = V' * M = ( M.transpose() * V ).transpose().
void mbl_matxvec_add_prod_vm (const vnl_vector< double > &V, const vnl_matrix< double > &M, vnl_vector< double > &R)
 Fast Compute R += V' * M = ( M.transpose() * V ).transpose().

Detailed Description

Various specialised versions of simple linear algebra operators.

Author:
Tim Cootes
Date:
3-Oct-97 Most of the specialisations are to do with size priorities. If the sizes do not match for normal linear algebra operations, these functions will for example, only use the first n elements of an >n input vector
   Modifications
   TFC    Revised version 3-Oct-97
   TFC    Added TC_MatXVec2
   NPC    Added NC_VecXMat
   IMS    started conversion to VXL 18 April 2001
   

Definition in file mbl_matxvec.cxx.


Function Documentation

void mbl_matxvec_add_prod_vm ( const vnl_vector< double > &  V,
const vnl_matrix< double > &  M,
vnl_vector< double > &  R 
)

Fast Compute R += V' * M = ( M.transpose() * V ).transpose().

Only use the first R.size() columns of M R is not resized - its size determines how many columns to use Ensure that V.elems() == M.rows().

NDEBUG

NDEBUG

Definition at line 255 of file mbl_matxvec.cxx.

void mbl_matxvec_prod_mv ( const vnl_matrix< double > &  M,
const vnl_vector< double > &  V,
vnl_vector< double > &  R 
)

Compute R = M*V.

Only use first V.size() columns of M R is resized to the number of rows of M

Definition at line 95 of file mbl_matxvec.cxx.

void mbl_matxvec_prod_mv_2 ( const vnl_matrix< double > &  M,
const vnl_vector< double > &  V,
vnl_vector< double > &  R 
)

Compute R = M*V.

Only use first V.size() columns of M Only use first R.size() rows of M R is not resized - its size determines how many rows to use

Definition at line 113 of file mbl_matxvec.cxx.

void mbl_matxvec_prod_vm ( const vnl_vector< double > &  V,
const vnl_matrix< double > &  M,
vnl_vector< double > &  R 
)

Fast Compute R = V' * M = ( M.transpose() * V ).transpose().

Only use the first R.size() columns of M R is not resized - its size determines how many columns to use Ensure that V.elems() == M.rows().

Definition at line 244 of file mbl_matxvec.cxx.