Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::numeric::ublas::blas_2 Namespace Reference

Interface and implementation of BLAS level 2 This includes functions which perform matrix-vector operations. More...

Functions

template<class V , class M >
V & tmv (V &v, const M &m)
 multiply vector v with triangular matrix m More...
 
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 More...
 
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 More...
 
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)$. More...
 
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)$ More...
 
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)$ More...
 
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)$ More...
 
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)$ More...
 

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 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)

References boost::numeric::ublas::prod().

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)

References boost::numeric::ublas::outer_prod().

Referenced by boost::graph::distributed::fleischer_hendrickson_pinar_strong_components_impl(), boost::math::octonion< T >::operator*=(), and boost::math::octonion< T >::operator/=().

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)

References boost::numeric::ublas::conj(), and boost::numeric::ublas::outer_prod().

Referenced by boost::chrono::detail::extract_z(), boost::math::octonion< T >::operator*=(), boost::math::octonion< T >::operator/=(), boost::spirit::intersection< A, B >::parse(), and boost::spirit::difference< A, B >::parse().

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)

References boost::numeric::ublas::scalar_traits< T >::conj(), boost::numeric::ublas::conj(), and boost::numeric::ublas::outer_prod().

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)

References boost::numeric::ublas::outer_prod().

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)

References boost::numeric::ublas::outer_prod().

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)

References boost::numeric::ublas::prod().

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

References boost::numeric::ublas::solve().