matrix_expression.hpp File Reference
#include <boost/type_traits/is_convertible.hpp>
#include "matrix_proxy.hpp"
#include "operation.hpp"

Go to the source code of this file.

Classes

class  shark::blas::outer_product< E1, E2 >
 
class  shark::blas::vector_repeater< V >
 
class  shark::blas::scalar_matrix< T >
 A matrix with all values of type T equal to the same value. More...
 
class  shark::blas::matrix_scalar_multiply< E >
 
class  shark::blas::matrix_unary< E, F >
 class which allows for matrix transformations More...
 
class  shark::blas::matrix_addition< E1, E2 >
 
class  shark::blas::matrix_binary< E1, E2, F >
 
class  shark::blas::matrix_vector_prod< MatA, VecV >
 
class  shark::blas::matrix_matrix_prod< MatA, MatB >
 
class  shark::blas::identity_matrix< T >
 An identity matrix with values of type T. More...
 

Namespaces

 shark
 AbstractMultiObjectiveOptimizer.
 
 shark::blas
 

Macros

#define SHARK_UNARY_MATRIX_TRANSFORMATION(name, F)
 
#define SHARK_MATRIX_SCALAR_TRANSFORMATION(name, F)
 
#define SHARK_MATRIX_SCALAR_TRANSFORMATION_2(name, F)
 
#define SHARK_BINARY_MATRIX_EXPRESSION(name, F)
 

Functions

template<class E1 , class E2 >
outer_product< E1, E2 > shark::blas::outer_prod (vector_expression< E1 > const &e1, vector_expression< E2 > const &e2)
 
template<class Vector >
vector_repeater< Vector > shark::blas::repeat (vector_expression< Vector > const &vector, std::size_t rows)
 Creates a matrix from a vector by repeating the vector in every row of the matrix. More...
 
template<class T >
boost::enable_if< boost::is_arithmetic< T >, scalar_matrix< T > >::type shark::blas::repeat (T scalar, std::size_t rows, std::size_t columns)
 
template<class E , class T >
boost::enable_if< boost::is_convertible< T, typename E::scalar_type >, matrix_scalar_multiply< E > >::type shark::blas::operator* (matrix_expression< E > const &e, T scalar)
 
template<class T , class E >
boost::enable_if< boost::is_convertible< T, typename E::scalar_type >, matrix_scalar_multiply< E > >::type shark::blas::operator* (T scalar, matrix_expression< E > const &e)
 
template<class E >
matrix_scalar_multiply< E > shark::blas::operator- (matrix_expression< E > const &e)
 
template<class E1 , class E2 >
matrix_addition< E1, E2 > shark::blas::operator+ (matrix_expression< E1 > const &e1, matrix_expression< E2 > const &e2)
 Adds two Matrices. More...
 
template<class E1 , class E2 >
matrix_addition< E1, matrix_scalar_multiply< E2 > > shark::blas::operator- (matrix_expression< E1 > const &e1, matrix_expression< E2 > const &e2)
 Subtracts two Matrices. More...
 
template<class E , class T >
boost::enable_if< boost::is_convertible< T, typename E::value_type >, matrix_addition< E, scalar_matrix< T > >>::type shark::blas::operator+ (matrix_expression< E > const &e, T t)
 Adds a matrix plus a scalar which is interpreted as a constant matrix. More...
 
template<class T , class E >
boost::enable_if< boost::is_convertible< T, typename E::value_type >, matrix_addition< E, scalar_matrix< T > >>::type shark::blas::operator+ (T t, matrix_expression< E > const &e)
 Adds a matrix plus a scalar which is interpreted as a constant matrix. More...
 
template<class E , class T >
boost::enable_if< boost::is_convertible< T, typename E::value_type >, matrix_addition< E, matrix_scalar_multiply< scalar_matrix< T > > >>::type shark::blas::operator- (matrix_expression< E > const &e, T t)
 Subtracts a scalar which is interpreted as a constant matrix from a matrix. More...
 
template<class E , class T >
boost::enable_if< boost::is_convertible< T, typename E::value_type >, matrix_addition< scalar_matrix< T >, matrix_scalar_multiply< E > >>::type shark::blas::operator- (T t, matrix_expression< E > const &e)
 Subtracts a matrix from a scalar which is interpreted as a constant matrix. More...
 
template<class E1 , class E2 >
matrix_binary< E1, E2, scalar_binary_safe_divide< typename E1::value_type, typename E2::value_type > > shark::blas::safe_div (matrix_expression< E1 > const &e1, matrix_expression< E2 > const &e2, typename promote_traits< typename E1::value_type, typename E2::value_type >::promote_type defaultValue)
 
template<class MatA , class VecV >
matrix_vector_prod< MatA, VecV > shark::blas::prod (matrix_expression< MatA > const &A, vector_expression< VecV > const &v)
 computes the matrix-vector product x+=Av More...
 
template<class MatA , class VecV >
matrix_vector_prod< matrix_transpose< MatA >, VecV > shark::blas::prod (vector_expression< VecV > const &v, matrix_expression< MatA > const &A)
 computes the matrix-vector product x+=v^TA More...
 
template<class MatA , class MatB >
matrix_matrix_prod< MatA, MatB > shark::blas::prod (matrix_expression< MatA > const &A, matrix_expression< MatB > const &B)
 computes the matrix-matrix product X+=AB More...
 
template<class MatA >
vector_temporary_type< typename MatA::value_type, dense_random_access_iterator_tag >::type shark::blas::sum_rows (matrix_expression< MatA > const &A)
 
template<class MatA >
vector_temporary_type< typename MatA::value_type, dense_random_access_iterator_tag >::type shark::blas::sum_columns (matrix_expression< MatA > const &A)
 
template<class MatA >
MatA::value_type shark::blas::sum (matrix_expression< MatA > const &A)
 
template<class MatA >
MatA::value_type shark::blas::max (matrix_expression< MatA > const &A)
 
template<class MatA >
MatA::value_type shark::blas::min (matrix_expression< MatA > const &A)
 
template<class E1 , class E2 >
promote_traits< typename E1::value_type, typename E2::value_type >::promote_type shark::blas::frobenius_prod (matrix_expression< E1 > const &e1, matrix_expression< E2 > const &e2)
 Returns the frobenius inner-product between matrices exprssions 1 and e2. More...
 
template<class E >
matrix_norm_1< E >::result_type shark::blas::norm_1 (const matrix_expression< E > &e)
 
template<class E >
real_traits< typename E::value_type >::type shark::blas::norm_frobenius (const matrix_expression< E > &e)
 
template<class E >
matrix_norm_inf< E >::result_type shark::blas::norm_inf (const matrix_expression< E > &e)
 
template<class MatrixT >
MatrixT::value_type shark::blas::trace (matrix_expression< MatrixT > const &m)
 Evaluates the sum of the values at the diagonal of matrix "v". More...
 

Macro Definition Documentation

§ SHARK_BINARY_MATRIX_EXPRESSION

#define SHARK_BINARY_MATRIX_EXPRESSION (   name,
 
)
Value:
template<class E1, class E2>\
matrix_binary<E1, E2, F<typename E1::value_type, typename E2::value_type> >\
name(matrix_expression<E1> const& e1, matrix_expression<E2> const& e2){\
typedef F<typename E1::value_type, typename E2::value_type> functor_type;\
return matrix_binary<E1, E2, functor_type>(e1,e2, functor_type());\
}

Definition at line 846 of file matrix_expression.hpp.

§ SHARK_MATRIX_SCALAR_TRANSFORMATION

#define SHARK_MATRIX_SCALAR_TRANSFORMATION (   name,
 
)
Value:
template<class E, class T> \
typename boost::enable_if< \
boost::is_convertible<T, typename E::value_type >,\
matrix_unary<E,F<typename E::value_type,T> > \
>::type \
name (matrix_expression<E> const& e, T scalar){ \
typedef F<typename E::value_type, T> functor_type; \
return matrix_unary<E, functor_type>(e, functor_type(scalar)); \
}

Definition at line 525 of file matrix_expression.hpp.

§ SHARK_MATRIX_SCALAR_TRANSFORMATION_2

#define SHARK_MATRIX_SCALAR_TRANSFORMATION_2 (   name,
 
)
Value:
template<class T, class E> \
typename boost::enable_if< \
boost::is_convertible<T, typename E::value_type >,\
matrix_unary<E,F<typename E::value_type,T> > \
>::type \
name (T scalar, matrix_expression<E> const& e){ \
typedef F<typename E::value_type, T> functor_type; \
return matrix_unary<E, functor_type>(e, functor_type(scalar)); \
}

Definition at line 548 of file matrix_expression.hpp.

§ SHARK_UNARY_MATRIX_TRANSFORMATION

#define SHARK_UNARY_MATRIX_TRANSFORMATION (   name,
 
)
Value:
template<class E>\
matrix_unary<E,F<typename E::value_type> >\
name(matrix_expression<E> const& e){\
typedef F<typename E::value_type> functor_type;\
return matrix_unary<E, functor_type>(e, functor_type());\
}

Definition at line 500 of file matrix_expression.hpp.