Boost.uBlas 1.49
Linear Algebra in C++: matrices, vectors and numeric algorithms

boost::numeric::ublas::blas_2 Namespace Reference

Interface and implementation of BLAS level 2 This includes functions which perform matrix-vector operations. More information about BLAS can be found at http://en.wikipedia.org/wiki/BLAS More...

Functions

template<class V1 , class T1 , class T2 , class M , class V2 >
V1 & gmv (V1 &v1, const T1 &t1, const T2 &t2, const M &m, const V2 &v2)
 compute $ v_1 = t_1.v_1 + t_2.(m.v_2)$, a general matrix-vector product
template<class M , class T , class V1 , class V2 >
M & gr (M &m, const T &t, const V1 &v1, const V2 &v2)
 Rank 1 update: $ m = m + t.(v_1.v_2^T)$.
template<class M , class T , class V >
M & hr (M &m, const T &t, const V &v)
 hermitian rank 1 update: $m = m + t.(v.v^H)$
template<class M , class T , class V1 , class V2 >
M & hr2 (M &m, const T &t, const V1 &v1, const V2 &v2)
 hermitian rank 2 update: $m=m+t.(v_1.v_2^H) + v_2.(t.v_1)^H)$
template<class M , class T , class V >
M & sr (M &m, const T &t, const V &v)
 symmetric rank 1 update: $m = m + t.(v.v^T)$
template<class M , class T , class V1 , class V2 >
M & sr2 (M &m, const T &t, const V1 &v1, const V2 &v2)
 symmetric rank 2 update: $ m=m+ t.(v_1.v_2^T + v_2.v_1^T)$
template<class V , class M >
V & tmv (V &v, const M &m)
 multiply vector v with triangular matrix m
template<class V , class M , class C >
V & tsv (V &v, const M &m, C)
 solve $m.x = v$ in place, where m is a triangular matrix

Detailed Description

Interface and implementation of BLAS level 2 This includes functions which perform matrix-vector operations. More information about BLAS can be found at http://en.wikipedia.org/wiki/BLAS


Function Documentation

template<class V , class M >
V& boost::numeric::ublas::blas_2::tmv ( V &  v,
const M &  m 
)

multiply vector v with triangular matrix m

Parameters:
va vector
ma triangular matrix
Returns:
the result of the product
Template Parameters:
Vtype of the vector (not needed by default)
Mtype of the matrix (not needed by default)

Definition at line 185 of file blas.hpp.

template<class V , class M , class C >
V& boost::numeric::ublas::blas_2::tsv ( V &  v,
const M &  m,
 
)

solve $m.x = v$ in place, where m is a triangular matrix

Parameters:
va vector
ma matrix
C(this parameter is not needed)
Returns:
a result vector from the above operation
Template Parameters:
Vtype of the vector (not needed by default)
Mtype of the matrix (not needed by default)
Cn/a

Definition at line 202 of file blas.hpp.

template<class V1 , class T1 , class T2 , class M , class V2 >
V1& boost::numeric::ublas::blas_2::gmv ( V1 &  v1,
const T1 &  t1,
const T2 &  t2,
const M &  m,
const V2 &  v2 
)

compute $ v_1 = t_1.v_1 + t_2.(m.v_2)$, a general matrix-vector product

Parameters:
v1a vector
t1a scalar
t2another scalar
ma matrix
v2another vector
Returns:
the vector v1 with the result from the above operation
Template Parameters:
V1type of first vector (not needed by default)
T1type of first scalar (not needed by default)
T2type of second scalar (not needed by default)
Mtype of matrix (not needed by default)
V2type of second vector (not needed by default)

Definition at line 223 of file blas.hpp.

template<class M , class T , class V1 , class V2 >
M& boost::numeric::ublas::blas_2::gr ( M &  m,
const T &  t,
const V1 &  v1,
const V2 &  v2 
)

Rank 1 update: $ m = m + t.(v_1.v_2^T)$.

Parameters:
ma matrix
ta scalar
v1a vector
v2another vector
Returns:
a matrix with the result from the above operation
Template Parameters:
Mtype of matrix (not needed by default)
Ttype of scalar (not needed by default)
V1type of first vector (not needed by default)
V2typeof second vector (not needed by default)

Definition at line 242 of file blas.hpp.

template<class M , class T , class V >
M& boost::numeric::ublas::blas_2::sr ( M &  m,
const T &  t,
const V &  v 
)

symmetric rank 1 update: $m = m + t.(v.v^T)$

Parameters:
ma matrix
ta scalar
va vector
Returns:
a matrix with the result from the above operation
Template Parameters:
Mtype of matrix (not needed by default)
Ttype of scalar (not needed by default)
Vtype of vector (not needed by default)

Definition at line 263 of file blas.hpp.

template<class M , class T , class V >
M& boost::numeric::ublas::blas_2::hr ( M &  m,
const T &  t,
const V &  v 
)

hermitian rank 1 update: $m = m + t.(v.v^H)$

Parameters:
ma matrix
ta scalar
va vector
Returns:
a matrix with the result from the above operation
Template Parameters:
Mtype of matrix (not needed by default)
Ttype of scalar (not needed by default)
Vtype of vector (not needed by default)

Definition at line 284 of file blas.hpp.

template<class M , class T , class V1 , class V2 >
M& boost::numeric::ublas::blas_2::sr2 ( M &  m,
const T &  t,
const V1 &  v1,
const V2 &  v2 
)

symmetric rank 2 update: $ m=m+ t.(v_1.v_2^T + v_2.v_1^T)$

Parameters:
ma matrix
ta scalar
v1a vector
v2another vector
Returns:
a matrix with the result from the above operation
Template Parameters:
Mtype of matrix (not needed by default)
Ttype of scalar (not needed by default)
V1type of first vector (not needed by default)
V2typeof second vector (not needed by default)

Definition at line 307 of file blas.hpp.

template<class M , class T , class V1 , class V2 >
M& boost::numeric::ublas::blas_2::hr2 ( M &  m,
const T &  t,
const V1 &  v1,
const V2 &  v2 
)

hermitian rank 2 update: $m=m+t.(v_1.v_2^H) + v_2.(t.v_1)^H)$

Parameters:
ma matrix
ta scalar
v1a vector
v2another vector
Returns:
a matrix with the result from the above operation
Template Parameters:
Mtype of matrix (not needed by default)
Ttype of scalar (not needed by default)
V1type of first vector (not needed by default)
V2typeof second vector (not needed by default)

Definition at line 330 of file blas.hpp.