shark::blas Namespace Reference

Namespaces

 kernels
 

Classes

class  Blocking
 partitions the matrix in 4 blocks defined by one splitting point (i,j). More...
 
class  compressed_matrix
 
class  compressed_vector
 Compressed array based sparse vector. More...
 
struct  const_expression< compressed_matrix< T, I > >
 
struct  const_expression< compressed_matrix< T, I > const >
 
struct  const_expression< compressed_vector< T, I > >
 
struct  const_expression< compressed_vector< T, I > const >
 
struct  const_expression< matrix< T, Orientation > >
 
struct  const_expression< matrix< T, Orientation > const >
 
struct  const_expression< triangular_matrix< T, Orientation, TriangularType > >
 
struct  const_expression< triangular_matrix< T, Orientation, TriangularType > const >
 
struct  const_expression< vector< T > >
 
struct  const_expression< vector< T > const >
 
class  dense_matrix_adaptor
 
class  dense_vector_adaptor
 Represents a given chunk of memory as a dense vector of elements of type T. More...
 
class  diagonal_matrix
 An diagonal matrix with values stored inside a diagonal vector. More...
 
class  identity_matrix
 An identity matrix with values of type T. More...
 
class  matrix
 A dense matrix of values of type T. More...
 
class  matrix_addition
 
class  matrix_binary
 
class  matrix_column
 
struct  matrix_container
 Base class for Matrix container models. More...
 
struct  matrix_expression
 Base class for Matrix Expression models. More...
 
class  matrix_matrix_prod
 
class  matrix_range
 
class  matrix_reference
 Wraps another expression as a reference. More...
 
class  matrix_row
 
class  matrix_scalar_multiply
 
class  matrix_set
 
struct  matrix_set_expression
 Base class for expressions of matrix sets. More...
 
struct  matrix_temporary_type< T, L, dense_random_access_iterator_tag >
 
struct  matrix_temporary_type< T, row_major, sparse_bidirectional_iterator_tag >
 
struct  matrix_temporary_type< T, unknown_orientation, dense_random_access_iterator_tag >
 
struct  matrix_temporary_type< T, unknown_orientation, sparse_bidirectional_iterator_tag >
 
class  matrix_transpose
 Matrix transpose. More...
 
class  matrix_unary
 class which allows for matrix transformations More...
 
class  matrix_vector_prod
 
class  matrix_vector_range
 
class  noalias_proxy
 
class  outer_product
 
struct  permutation_matrix
 
class  scalar_matrix
 A matrix with all values of type T equal to the same value. More...
 
class  scalar_vector
 Vector expression representing a constant valued vector. More...
 
struct  SolveAXB
 Flag indicating that a system AX=B is to be solved. More...
 
struct  SolveXAB
 Flag indicating that a system XA=B is to be solved. More...
 
class  sparse_vector_adaptor
 
struct  temporary_proxy
 
class  triangular_matrix
 
class  vector
 A dense vector of values of type T. More...
 
class  vector_addition
 
class  vector_binary
 
struct  vector_container
 Base class for Vector container models. More...
 
struct  vector_expression
 Base class for Vector Expression models. More...
 
class  vector_range
 A vector referencing a continuous subvector of elements of vector v containing all elements specified by range. More...
 
class  vector_reference
 
class  vector_repeater
 
class  vector_scalar_multiply
 Implements multiplications of a vector by a scalar. More...
 
struct  vector_set_expression
 Base class for expressions of vector sets. More...
 
struct  vector_temporary_type< T, dense_random_access_iterator_tag >
 
struct  vector_temporary_type< T, sparse_bidirectional_iterator_tag >
 
class  vector_unary
 Class implementing vector transformation expressions. More...
 

Functions

template<class VecX , class VecV >
VecX & assign (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Dispatches vector assignment on an expression level. More...
 
template<class VecX , class VecV >
VecX & plus_assign (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Dispatches vector plus-assignment on an expression level. More...
 
template<class VecX , class VecV >
VecX & minus_assign (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Dispatches vector minus-assignment on an expression level. More...
 
template<class VecX , class VecV >
VecX & multiply_assign (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Dispatches vector multiply-assignment on an expression level. More...
 
template<class VecX , class VecV >
VecX & divide_assign (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Dispatches vector multiply-assignment on an expression level. More...
 
template<class MatA , class MatB >
MatA & assign (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Dispatches matrix assignment on an expression level. More...
 
template<class MatA , class MatB >
MatA & plus_assign (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Dispatches matrix plus-assignment on an expression level. More...
 
template<class MatA , class MatB >
MatA & minus_assign (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Dispatches matrix plus-assignment on an expression level. More...
 
template<class MatA , class MatB >
MatA & multiply_assign (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Dispatches matrix multiply-assignment on an expression level. More...
 
template<class MatA , class MatB >
MatA & divide_assign (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Dispatches matrix divide-assignment on an expression level. More...
 
template<class VecX , class VecV >
VecX & operator+= (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Add-Assigns two vector expressions. More...
 
template<class VecX , class VecV >
VecX & operator-= (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Subtract-Assigns two vector expressions. More...
 
template<class VecX , class VecV >
VecX & operator*= (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Multiply-Assigns two vector expressions. More...
 
template<class VecX , class VecV >
VecX & operator/= (vector_expression< VecX > &x, vector_expression< VecV > const &v)
 Divide-Assigns two vector expressions. More...
 
template<class VecX >
VecX & operator+= (vector_expression< VecX > &x, typename VecX::scalar_type t)
 Adds a scalar to all elements of the vector. More...
 
template<class VecX >
VecX & operator-= (vector_expression< VecX > &x, typename VecX::scalar_type t)
 Subtracts a scalar from all elements of the vector. More...
 
template<class VecX >
VecX & operator*= (vector_expression< VecX > &x, typename VecX::scalar_type t)
 Multiplies a scalar with all elements of the vector. More...
 
template<class VecX >
VecX & operator/= (vector_expression< VecX > &x, typename VecX::scalar_type t)
 Divides all elements of the vector by a scalar. More...
 
template<class MatA , class MatB >
MatA & operator+= (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Add-Assigns two matrix expressions. More...
 
template<class MatA , class MatB >
MatA & operator-= (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Subtract-Assigns two matrix expressions. More...
 
template<class MatA , class MatB >
MatA & operator*= (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Multiply-Assigns two matrix expressions. More...
 
template<class MatA , class MatB >
MatA & operator/= (matrix_expression< MatA > &A, matrix_expression< MatB > const &B)
 Divide-Assigns two matrix expressions. More...
 
template<class MatA >
MatA & operator+= (matrix_expression< MatA > &A, typename MatA::scalar_type t)
 Adds a scalar to all elements of the matrix. More...
 
template<class MatA >
MatA & operator-= (matrix_expression< MatA > &A, typename MatA::scalar_type t)
 Subtracts a scalar from all elements of the matrix. More...
 
template<class MatA >
MatA & operator*= (matrix_expression< MatA > &A, typename MatA::scalar_type t)
 Multiplies a scalar to all elements of the matrix. More...
 
template<class MatA >
MatA & operator/= (matrix_expression< MatA > &A, typename MatA::scalar_type t)
 Divides all elements of the matrix by a scalar. More...
 
template<class T , class U >
temporary_proxy< T > operator+= (temporary_proxy< T > x, U const &arg)
 
template<class T , class U >
temporary_proxy< T > operator-= (temporary_proxy< T > x, U const &arg)
 
template<class T , class U >
temporary_proxy< T > operator*= (temporary_proxy< T > x, U const &arg)
 
template<class T , class U >
temporary_proxy< T > operator/= (temporary_proxy< T > x, U const &arg)
 
template<class C >
noalias_proxy< C > noalias (matrix_expression< C > &lvalue)
 
template<class C >
noalias_proxy< C > noalias (vector_expression< C > &lvalue)
 
template<class C >
noalias_proxy< C > noalias (matrix_set_expression< C > &lvalue)
 
template<class C >
noalias_proxy< C > noalias (vector_set_expression< C > &lvalue)
 
template<class C >
noalias_proxy< C > noalias (temporary_proxy< C > lvalue)
 
template<class E >
boost::mpl::eval_if< boost::is_same< typename E::evaluation_category, blockwise_tag >, vector_temporary< E >, boost::mpl::identity< E const & >>::type eval_block (blas::vector_expression< E > const &e)
 conditionally evaluates a vector expression if it is a block expression More...
 
template<class E >
boost::mpl::eval_if< boost::is_same< typename E::evaluation_category, blockwise_tag >, matrix_temporary< E >, boost::mpl::identity< E const & >>::type eval_block (blas::matrix_expression< E > const &e)
 conditionally evaluates a matrix expression if it is a block expression More...
 
template<class E , class T , class VE >
std::basic_ostream< E, T > & operator<< (std::basic_ostream< E, T > &os, const vector_expression< VE > &v)
 output stream operator for vector expressions More...
 
template<class E , class T , class ME >
std::basic_ostream< E, T > & operator<< (std::basic_ostream< E, T > &os, const matrix_expression< ME > &m)
 output stream operator for matrix expressions More...
 
template<class M >
M::size_type lu_factorize (M &m)
 
template<class M , class PM >
M::size_type lu_factorize (M &m, PM &pm)
 
template<class E1 , class E2 >
outer_product< E1, E2 > outer_prod (vector_expression< E1 > const &e1, vector_expression< E2 > const &e2)
 
template<class Vector >
vector_repeater< Vector > 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 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 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 operator* (T scalar, matrix_expression< E > const &e)
 
template<class E >
matrix_scalar_multiply< E > operator- (matrix_expression< E > const &e)
 
template<class E1 , class E2 >
matrix_addition< E1, E2 > 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 > > 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 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 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 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 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 > > 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 > 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 > 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 > 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 sum_rows (matrix_expression< MatA > const &A)
 
template<class MatA >
vector_temporary_type< typename MatA::value_type, dense_random_access_iterator_tag >::type sum_columns (matrix_expression< MatA > const &A)
 
template<class MatA >
MatA::value_type sum (matrix_expression< MatA > const &A)
 
template<class MatA >
MatA::value_type max (matrix_expression< MatA > const &A)
 
template<class MatA >
MatA::value_type min (matrix_expression< MatA > const &A)
 
template<class E1 , class E2 >
promote_traits< typename E1::value_type, typename E2::value_type >::promote_type 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 norm_1 (const matrix_expression< E > &e)
 
template<class E >
real_traits< typename E::value_type >::type norm_frobenius (const matrix_expression< E > &e)
 
template<class E >
matrix_norm_inf< E >::result_type norm_inf (const matrix_expression< E > &e)
 
template<class MatrixT >
MatrixT::value_type trace (matrix_expression< MatrixT > const &m)
 Evaluates the sum of the values at the diagonal of matrix "v". More...
 
template<class M >
matrix_transpose< typename const_expression< M >::type > trans (matrix_expression< M > const &m)
 
template<class M >
temporary_proxy< matrix_transpose< M > > trans (matrix_expression< M > &m)
 
template<class M >
temporary_proxy< matrix_transpose< M > > trans (temporary_proxy< M > m)
 
template<class M >
temporary_proxy< matrix_row< M > > row (matrix_expression< M > &expression, typename M::index_type i)
 
template<class M >
matrix_row< typename const_expression< M >::type > row (matrix_expression< M > const &expression, typename M::index_type i)
 
template<class M >
temporary_proxy< matrix_row< M > > row (temporary_proxy< M > expression, typename M::index_type i)
 
template<class M >
temporary_proxy< matrix_column< M > > column (matrix_expression< M > &expression, typename M::index_type j)
 
template<class M >
matrix_column< typename const_expression< M >::type > column (matrix_expression< M > const &expression, typename M::index_type j)
 
template<class M >
temporary_proxy< matrix_column< M > > column (temporary_proxy< M > expression, typename M::index_type j)
 
template<class M >
matrix_vector_range< typename const_expression< M >::type > diag (matrix_expression< M > const &mat)
 Returns the diagonal of a constant square matrix as vector. More...
 
template<class M >
temporary_proxy< matrix_vector_range< M > > diag (matrix_expression< M > &mat)
 Returns the diagonal of a square matrix as vector. More...
 
template<class M >
temporary_proxy< matrix_vector_range< M > > diag (temporary_proxy< M > mat)
 
template<class M >
temporary_proxy< matrix_range< M > > subrange (matrix_expression< M > &expression, std::size_t start1, std::size_t stop1, std::size_t start2, std::size_t stop2)
 
template<class M >
matrix_range< typename const_expression< M >::type > subrange (matrix_expression< M > const &expression, std::size_t start1, std::size_t stop1, std::size_t start2, std::size_t stop2)
 
template<class M >
temporary_proxy< matrix_range< M > > subrange (temporary_proxy< M > expression, std::size_t start1, std::size_t stop1, std::size_t start2, std::size_t stop2)
 
template<class M >
temporary_proxy< matrix_range< M > > rows (matrix_expression< M > &expression, std::size_t start, std::size_t stop)
 
template<class M >
matrix_range< typename const_expression< M >::type > rows (matrix_expression< M > const &expression, std::size_t start, std::size_t stop)
 
template<class M >
temporary_proxy< matrix_range< M > > rows (temporary_proxy< M > expression, std::size_t start, std::size_t stop)
 
template<class M >
temporary_proxy< matrix_range< M > > columns (matrix_expression< M > &expression, typename M::index_type start, typename M::index_type stop)
 
template<class M >
matrix_range< typename const_expression< M >::type > columns (matrix_expression< M > const &expression, typename M::index_type start, typename M::index_type stop)
 
template<class M >
temporary_proxy< matrix_range< M > > columns (temporary_proxy< M > expression, std::size_t start, std::size_t stop)
 
template<class T >
temporary_proxy< dense_matrix_adaptor< T > > adapt_matrix (std::size_t size1, std::size_t size2, T *data)
 Converts a chunk of memory into a matrix of given size. More...
 
template<class T , std::size_t M, std::size_t N>
temporary_proxy< dense_matrix_adaptor< T > > adapt_matrix (T(&array)[M][N])
 Converts a 2D C-style array into a matrix of given size. More...
 
template<class V >
boost::enable_if< boost::is_same< typename V::storage_category, dense_tag >, temporary_proxy< dense_matrix_adaptor< typename boost::remove_reference< typename V::reference >::type > >>::type to_matrix (vector_expression< V > &v, std::size_t size1, std::size_t size2)
 Converts a dense vector to a matrix of a given size. More...
 
template<class V >
boost::enable_if< boost::is_same< typename V::storage_category, dense_tag >, temporary_proxy< dense_matrix_adaptor< typename V::value_type const > >>::type to_matrix (vector_expression< V > const &v, std::size_t size1, std::size_t size2)
 Converts a dense vector to a matrix of a given size. More...
 
template<class E >
boost::enable_if< boost::is_same< typename E::storage_category, dense_tag >, temporary_proxy< dense_matrix_adaptor< typename boost::remove_reference< typename E::reference >::type > >>::type to_matrix (temporary_proxy< E > v, std::size_t size1, std::size_t size2)
 
template<class ResultV , class M , class V >
void axpy_prod (matrix_expression< M > const &matrix, vector_expression< V > const &vector, vector_expression< ResultV > &result, bool init=true, typename ResultV::value_type alpha=1.0)
 Computes y=alpha*Ax or y += alpha*Ax. More...
 
template<class ResultV , class M , class V >
void axpy_prod (matrix_expression< M > const &matrix, vector_expression< V > const &vector, temporary_proxy< ResultV > result, bool init=true, typename ResultV::value_type alpha=1.0)
 Computes C=alpha*Ax or C += alpha*Ax. More...
 
template<class ResultV , class V , class M >
void axpy_prod (vector_expression< V > const &vector, matrix_expression< M > const &matrix, vector_expression< ResultV > &result, bool init=true, typename ResultV::value_type alpha=1.0)
 Computes y=alpha*xA or y += alpha*xA. More...
 
template<class ResultV , class M , class V >
void axpy_prod (vector_expression< V > const &vector, matrix_expression< M > const &matrix, temporary_proxy< ResultV > result, bool init=true, typename ResultV::value_type alpha=1.0)
 Computes C=alpha*xA or C += alpha*xA. More...
 
template<class M , class E1 , class E2 >
void axpy_prod (matrix_expression< E1 > const &e1, matrix_expression< E2 > const &e2, matrix_expression< M > &m, bool init=true, typename M::value_type alpha=1.0)
 Implements the matrix products m+=alpha * e1*e2 or m = alpha*e1*e2. More...
 
template<class M , class E1 , class E2 >
void axpy_prod (matrix_expression< E1 > const &e1, matrix_expression< E2 > const &e2, temporary_proxy< M > m, bool init=true, typename M::value_type alpha=1.0)
 
template<class M , class E >
void symm_prod (matrix_expression< E > const &A, matrix_expression< M > &m, bool init=true, typename M::value_type alpha=1.0)
 computes C= alpha*AA^T or C+=alpha* AA^T More...
 
template<class M , class E >
void symm_prod (matrix_expression< E > const &A, temporary_proxy< M > &m, bool init=1.0, typename M::value_type alpha=1.0)
 computes C= alpha*AA^T or C+=alpha* AA^T More...
 
template<class TriangularType , class MatrixA , class V >
void triangular_prod (matrix_expression< MatrixA > const &A, vector_expression< V > &x)
 Computes x=Ax for a triangular matrix A. More...
 
template<class TriangularType , class MatrixA , class MatB >
void triangular_prod (matrix_expression< MatrixA > const &A, matrix_expression< MatB > &B)
 Computes B=AB for a triangular matrix A and a dense matrix B in place. More...
 
template<class TriangularType , class MatrixA , class E >
void triangular_prod (matrix_expression< MatrixA > const &A, temporary_proxy< E > e)
 triangular prod for temporary left-hand side arguments More...
 
template<class M >
void swap_rows (permutation_matrix const &P, matrix_expression< M > &A)
 implements row pivoting at matrix A using permutation P More...
 
template<class V >
void swap_rows (permutation_matrix const &P, vector_expression< V > &v)
 implements column pivoting of vector A using permutation P More...
 
template<class V , class Permutation >
void swap_rows_inverted (Permutation const &P, vector_expression< V > &v)
 implements the inverse row pivoting of vector v using permutation P More...
 
template<class M >
void swap_columns (permutation_matrix const &P, matrix_expression< M > &A)
 implements column pivoting at matrix A using permutation P More...
 
template<class M >
void swap_rows_inverted (permutation_matrix const &P, matrix_expression< M > &A)
 implements the inverse row pivoting at matrix A using permutation P More...
 
template<class M >
void swap_columns_inverted (permutation_matrix const &P, matrix_expression< M > &A)
 implements the inverse column pivoting at matrix A using permutation P More...
 
template<class M >
void swap_full (permutation_matrix const &P, matrix_expression< M > &A)
 Implements full pivoting at matrix A using permutation P. More...
 
template<class M >
void swap_full_inverted (permutation_matrix const &P, matrix_expression< M > &A)
 implements the inverse full pivoting at matrix A using permutation P More...
 
template<class T , class E >
boost::enable_if< boost::is_convertible< T, typename E::scalar_type >, vector_scalar_multiply< E >>::type operator* (vector_expression< E > const &e, T scalar)
 
template<class T , class E >
boost::enable_if< boost::is_convertible< T, typename E::scalar_type >, vector_scalar_multiply< E >>::type operator* (T scalar, vector_expression< E > const &e)
 
template<class E >
vector_scalar_multiply< E > operator- (vector_expression< E > const &e)
 
template<class T >
boost::enable_if< boost::is_arithmetic< T >, scalar_vector< T > >::type repeat (T scalar, std::size_t elements)
 Creates a vector having a constant value. More...
 
template<class E1 , class E2 >
vector_addition< E1, E2 > operator+ (vector_expression< E1 > const &e1, vector_expression< E2 > const &e2)
 Adds two vectors. More...
 
template<class E1 , class E2 >
vector_addition< E1, vector_scalar_multiply< E2 > > operator- (vector_expression< E1 > const &e1, vector_expression< E2 > const &e2)
 Subtracts two vectors. More...
 
template<class E , class T >
boost::enable_if< boost::is_convertible< T, typename E::value_type >, vector_addition< E, scalar_vector< T > >>::type operator+ (vector_expression< E > const &e, T t)
 Adds a vector plus a scalr which is interpreted as a constant vector. More...
 
template<class T , class E >
boost::enable_if< boost::is_convertible< T, typename E::value_type >, vector_addition< E, scalar_vector< T > >>::type operator+ (T t, vector_expression< E > const &e)
 Adds a vector plus a scalar which is interpreted as a constant vector. More...
 
template<class E , class T >
boost::enable_if< boost::is_convertible< T, typename E::value_type >, vector_addition< E, vector_scalar_multiply< scalar_vector< T > > >>::type operator- (vector_expression< E > const &e, T t)
 Subtracts a scalar which is interpreted as a constant vector from a vector. More...
 
template<class E , class T >
boost::enable_if< boost::is_convertible< T, typename E::value_type >, vector_addition< scalar_vector< T >, vector_scalar_multiply< E > >>::type operator- (T t, vector_expression< E > const &e)
 Subtracts a vector from a scalar which is interpreted as a constant vector. More...
 
template<class E1 , class E2 >
vector_binary< E1, E2, scalar_binary_safe_divide< typename E1::value_type, typename E2::value_type > > safe_div (vector_expression< E1 > const &e1, vector_expression< E2 > const &e2, typename promote_traits< typename E1::value_type, typename E2::value_type >::promote_type defaultValue)
 
template<class E >
E::value_type sum (const vector_expression< E > &e)
 sum v = sum_i v_i More...
 
template<class E >
E::value_type max (const vector_expression< E > &e)
 max v = max_i v_i More...
 
template<class E >
E::value_type min (const vector_expression< E > &e)
 min v = min_i v_i More...
 
template<class E >
std::size_t arg_max (const vector_expression< E > &e)
 arg_max v = arg max_i v_i More...
 
template<class E >
std::size_t arg_min (const vector_expression< E > &e)
 arg_min v = arg min_i v_i More...
 
template<class E >
E::value_type soft_max (const vector_expression< E > &e)
 soft_max v = ln(sum(exp(v))) More...
 
template<class E >
real_traits< typename E::value_type >::type norm_1 (const vector_expression< E > &e)
 norm_1 v = sum_i |v_i| More...
 
template<class E >
real_traits< typename E::value_type >::type norm_sqr (const vector_expression< E > &e)
 norm_2 v = sum_i |v_i|^2 More...
 
template<class E >
real_traits< typename E::value_type >::type norm_2 (const vector_expression< E > &e)
 norm_2 v = sqrt (sum_i |v_i|^2 ) More...
 
template<class E >
real_traits< typename E::value_type >::type norm_inf (vector_expression< E > const &e)
 norm_inf v = max_i |v_i| More...
 
template<class E >
std::size_t index_norm_inf (vector_expression< E > const &e)
 index_norm_inf v = arg max_i |v_i| More...
 
template<class E1 , class E2 >
promote_traits< typename E1::value_type, typename E2::value_type >::promote_type inner_prod (vector_expression< E1 > const &e1, vector_expression< E2 > const &e2)
 
template<class V >
temporary_proxy< vector_range< V > > subrange (vector_expression< V > &data, typename V::size_type start, typename V::size_type stop)
 Return a vector_range on a specified vector, a start and stop index. Return a vector_range on a specified vector, a start and stop index. The resulting vector_range can be manipulated like a normal vector. If the specified range falls outside that of of the index range of the vector, then the resulting vector_range is not a well formed Vector Expression and access to an element outside of index range of the vector is undefined. More...
 
template<class V >
vector_range< typename const_expression< V >::type > subrange (vector_expression< V > const &data, typename V::size_type start, typename V::size_type stop)
 Return a const vector_range on a specified vector, a start and stop index. Return a const vector_range on a specified vector, a start and stop index. The resulting const vector_range can be manipulated like a normal vector. If the specified range falls outside that of of the index range of the vector, then the resulting vector_range is not a well formed Vector Expression and access to an element outside of index range of the vector is undefined. More...
 
template<class V >
temporary_proxy< vector_range< V > > subrange (temporary_proxy< V > data, typename V::size_type start, typename V::size_type stop)
 
template<class T >
temporary_proxy< dense_vector_adaptor< T > > adapt_vector (std::size_t size, T *data)
 Converts a chunk of memory into a vector of a given size. More...
 
template<class T , std::size_t N>
temporary_proxy< dense_vector_adaptor< T > > adapt_vector (T(&array)[N])
 Converts a C-style array into a vector. More...
 
template<class VectorT , class WeightT >
VectorT::value_type diagonalMahalanobisNormSqr (vector_expression< VectorT > const &vector, vector_expression< WeightT > const &weights)
 Normalized squared norm_2 (diagonal Mahalanobis). More...
 
template<class VectorT , class WeightT >
VectorT::value_type diagonalMahalanobisNorm (vector_expression< VectorT > const &vector, vector_expression< WeightT > const &weights)
 Normalized norm_2 (diagonal Mahalanobis). More...
 
template<class System , class DiagType , class MatT , class VecT >
void solveTriangularSystemInPlace (const matrix_expression< MatT > &A, vector_expression< VecT > &b)
 In-place triangular linear equation solver. More...
 
template<class System , class DiagType , class MatA , class MatB >
void solveTriangularSystemInPlace (const matrix_expression< MatA > &A, matrix_expression< MatB > &B)
 In-place triangular linear equation solver. More...
 
template<class System , class MatL , class MatB >
void solveTriangularCholeskyInPlace (const matrix_expression< MatL > &L, matrix_expression< MatB > &B)
 In-Place solver if A was already cholesky decomposed Solves multiple systems of linear equations Ax_1=b_1 Ax_1=b_2 ... =>AX=B or XA=B given an A which was already Cholesky-decomposed as A=LL^T where L is a lower triangular matrix. More...
 
template<class System , class MatL , class VecB >
void solveTriangularCholeskyInPlace (const matrix_expression< MatL > &L, vector_expression< VecB > &b)
 In-Place solver if A was already cholesky decomposed Solves system of linear equations Ax=b given an A which was already Cholesky-decomposed as A=LL^T where L is a lower triangular matrix. More...
 
template<class MatrixT , class MatrixL >
void choleskyDecomposition (matrix_expression< MatrixT > const &A, matrix_expression< MatrixL > &L)
 Lower triangular Cholesky decomposition. More...
 
template<class Matrix , class Vector >
void choleskyUpdate (matrix_expression< Matrix > &L, vector_expression< Vector > const &v, double alpha, double beta)
 Updates a covariance factor by a rank one update. More...
 
template<class MatrixL >
std::size_t pivotingCholeskyDecompositionInPlace (shark::blas::matrix_expression< MatrixL > &Lref, PermutationMatrix &P)
 Lower triangular Cholesky decomposition with full pivoting performed in place. More...
 
template<class MatrixA , class MatrixL >
std::size_t pivotingCholeskyDecomposition (matrix_expression< MatrixA > const &A, PermutationMatrix &P, matrix_expression< MatrixL > &L)
 Lower triangular Cholesky decomposition with full pivoting. More...
 
template<class MatrixT , class MatrixU , class VectorT >
void eigensymm (matrix_expression< MatrixT > const &A, matrix_expression< MatrixU > &eigenVectors, vector_expression< VectorT > &eigenValues)
 Used as frontend for eigensymm for calculating the eigenvalues and the normalized eigenvectors of a symmetric matrix 'A' using the Givens and Householder reduction. Each time this frontend is called additional memory is allocated for intermediate results. More...
 
template<class Source >
detail::ADLVector< Source & > init (vector_container< Source > &source)
 Starting-point for the initialization sequence. More...
 
template<class Source >
detail::ADLVector< const Source & > init (const vector_container< Source > &source)
 Starting-point for the initialization sequence. More...
 
template<class Source >
detail::ADLVector< vector_range< Source > > init (const vector_range< Source > &source)
 Starting-point for the initialization sequence when used for splitting the vector. More...
 
template<class Source >
detail::ADLVector< matrix_row< Source > > init (const matrix_row< Source > &source)
 Specialization for matrix rows. More...
 
template<class Source >
detail::ADLVector< matrix_column< Source > > init (const matrix_row< Source > &source)
 Specialization for matrix columns. More...
 
template<class Matrix >
detail::MatrixExpression< const Matrix > toVector (const matrix_expression< Matrix > &matrix)
 Linearizes a matrix as a set of row vectors and treats them as a set of vectors for initialization. More...
 
template<class Matrix >
detail::MatrixExpression< Matrix > toVector (matrix_expression< Matrix > &matrix)
 Linearizes a matrix as a set of row vectors and treats them as a set of vectors for initialization. More...
 
template<class T >
detail::ParameterizableExpression< const T > parameters (const T &object)
 Uses the parameters of a parameterizable object for initialization. More...
 
template<class T >
detail::ParameterizableExpression< T > parameters (T &object)
 Uses the parameters of a parameterizable object for initialization. More...
 
template<class T >
detail::InitializerRange< typename T::const_iterator, detail::VectorExpression< const typename T::value_type & > > vectorSet (const T &range)
 Uses a range of vectors for initialization. More...
 
template<class T >
detail::InitializerRange< typename T::iterator, detail::VectorExpression< typename T::value_type & > > vectorSet (T &range)
 Uses a range of vectors for splitting and initialization. More...
 
template<class T >
detail::InitializerRange< typename T::const_iterator, detail::MatrixExpression< const typename T::value_type > > matrixSet (const T &range)
 Uses a range of vectors for initialization. More...
 
template<class T >
detail::InitializerRange< typename T::iterator, detail::MatrixExpression< typename T::value_type > > matrixSet (T &range)
 Uses a range of vectors for splitting and initialization. More...
 
template<class T >
detail::InitializerRange< typename T::const_iterator, detail::ParameterizableExpression< const typename T::value_type > > parameterSet (const T &range)
 Uses a range of parametrizable objects for initialization. More...
 
template<class T >
detail::InitializerRange< typename T::iterator, detail::ParameterizableExpression< typename T::value_type > > parameterSet (T &range)
 Uses a range of parametrizable objects for splitting and initialization. More...
 
template<class VectorT , class VectorU , class WeightT >
VectorT::value_type diagonalMahalanobisDistanceSqr (vector_expression< VectorT > const &op1, vector_expression< VectorU > const &op2, vector_expression< WeightT > const &weights)
 Normalized Euclidian squared distance (squared diagonal Mahalanobis) between two vectors. More...
 
template<class VectorT , class VectorU >
VectorT::value_type distanceSqr (vector_expression< VectorT > const &op1, vector_expression< VectorU > const &op2)
 Squared distance between two vectors. More...
 
template<class MatrixT , class VectorU , class VectorR >
void distanceSqr (matrix_expression< MatrixT > const &operands, vector_expression< VectorU > const &op2, vector_expression< VectorR > &distances)
 Squared distance between a vector and a set of vectors and stores the result in the vector of distances. More...
 
template<class MatrixT , class VectorU >
vector< typename MatrixT::value_type > distanceSqr (matrix_expression< MatrixT > const &operands, vector_expression< VectorU > const &op2)
 Squared distance between a vector and a set of vectors. More...
 
template<class MatrixT , class VectorU >
vector< typename MatrixT::value_type > distanceSqr (vector_expression< VectorU > const &op1, matrix_expression< MatrixT > const &operands)
 Squared distance between a vector and a set of vectors. More...
 
template<class MatrixT , class MatrixU >
matrix< typename MatrixT::value_type > distanceSqr (matrix_expression< MatrixT > const &X, matrix_expression< MatrixU > const &Y)
 Squared distance between the vectors of two sets of vectors. More...
 
template<class VectorT , class VectorU >
VectorT::value_type distance (vector_expression< VectorT > const &op1, vector_expression< VectorU > const &op2)
 Calculates distance between two vectors. More...
 
template<class VectorT , class VectorU , class WeightT >
VectorT::value_type diagonalMahalanobisDistance (vector_expression< VectorT > const &op1, vector_expression< VectorU > const &op2, vector_expression< WeightT > const &weights)
 Normalized euclidian distance (diagonal Mahalanobis) between two vectors. More...
 
template<class X , class R >
X::value_type createHouseholderReflection (vector_expression< X > const &x, vector_expression< R > &reflection)
 Generates a Householder reflection from a vector to use with applyHouseholderLeft/Right. More...
 
template<class Mat , class R , class T >
void applyHouseholderOnTheRight (matrix_expression< Mat > &matrix, vector_expression< R > const &reflection, T beta)
 
template<class Mat , class R , class T >
void applyHouseholderOnTheLeft (matrix_expression< Mat > &matrix, vector_expression< R > const &reflection, T const &beta)
 rotates a matrix using a householder reflection More...
 
template<class Mat , class R , class T >
void applyHouseholderOnTheLeft (temporary_proxy< Mat > matrix, vector_expression< R > const &reflection, T const &beta)
 rotates a matrix using a householder reflection More...
 
template<class MatrixT , typename RngType >
void randomRotationMatrix (matrix_container< MatrixT > &matrixC, RngType &rng)
 Initializes a matrix such that it forms a random rotation matrix. More...
 
template<class MatrixT >
void randomRotationMatrix (matrix_container< MatrixT > &matrixC)
 Initializes a matrix such that it forms a random rotation. More...
 
template<typename RngType >
RealMatrix randomRotationMatrix (size_t size, RngType &rng)
 Creates a random rotation matrix with a certain size using the random number generator rng. More...
 
RealMatrix randomRotationMatrix (size_t size)
 Creates a random rotation matrix with a certain size using the global random number gneerator. More...
 
template<class MatrixT , class Mat >
std::size_t pivotingRQ (blas::matrix_expression< MatrixT > const &matrixA, blas::matrix_container< Mat > &matrixR, blas::matrix_container< Mat > &matrixQ, blas::permutation_matrix &permutation)
 Determines the RQ Decomposition of the matrix A using pivoting returning the housholder transformation instead of Q. More...
 
template<class MatrixT , class MatrixU >
std::size_t pivotingRQHouseholder (blas::matrix_expression< MatrixT > const &matrixA, blas::matrix_container< MatrixU > &matrixR, blas::matrix_container< MatrixU > &householderV, blas::permutation_matrix &permutation)
 Determines the RQ Decomposition of the matrix A using pivoting. More...
 
template<class MatT , class VecT >
void solveSystemInPlace (matrix_expression< MatT > const &A, vector_expression< VecT > &b)
 In-Place System of linear equations solver. More...
 
template<class MatT , class Vec1T , class Vec2T >
void solveSystem (const matrix_expression< MatT > &A, vector_expression< Vec1T > &x, const vector_expression< Vec2T > &b)
 System of linear equations solver. More...
 
template<class MatT , class Mat2T >
void solveSystemInPlace (matrix_expression< MatT > const &A, matrix_expression< Mat2T > &B)
 In-Place system of linear equations solver. More...
 
template<class MatT , class Mat1T , class Mat2T >
void solveSystem (const matrix_expression< MatT > &A, matrix_expression< Mat1T > &X, const matrix_expression< Mat2T > &B)
 System of linear equations solver. More...
 
template<class System , class MatT , class VecT >
void solveSymmPosDefSystemInPlace (matrix_expression< MatT > const &A, vector_expression< VecT > &b)
 System of symmetric linear equations solver. The result is stored in b. More...
 
template<class System , class MatT , class Mat1T >
void solveSymmPosDefSystemInPlace (matrix_expression< MatT > const &A, matrix_expression< Mat1T > &B)
 System of symmetric linear equations solver. More...
 
template<class System , class MatT , class Vec1T , class Vec2T >
void solveSymmPosDefSystem (matrix_expression< MatT > const &A, vector_expression< Vec1T > &x, vector_expression< Vec2T > const &b)
 System of symmetric linear equations solver. More...
 
template<class System , class MatT , class Mat1T , class Mat2T >
void solveSymmPosDefSystem (matrix_expression< MatT > const &A, matrix_expression< Mat1T > &X, matrix_expression< Mat2T > const &B)
 System of symmetric linear equations solver. More...
 
template<class System , class MatT , class VecT >
void solveSymmSemiDefiniteSystemInPlace (matrix_expression< MatT > const &A, vector_expression< VecT > &b)
 Solves a square system of linear equations without full rank. More...
 
template<class System , class Mat1T , class Mat2T >
void solveSymmSemiDefiniteSystemInPlace (matrix_expression< Mat1T > const &A, matrix_expression< Mat2T > &B)
 Solves multiple square system of linear equations without full rank. More...
 
template<class System , class MatT , class VecT >
void generalSolveSystemInPlace (matrix_expression< MatT > const &A, vector_expression< VecT > &b)
 Solves a non-square system of linear equations. More...
 
template<class System , class MatA , class MatB >
void generalSolveSystemInPlace (matrix_expression< MatA > const &A, matrix_expression< MatB > &B)
 Solves multiple non-square systems of linear equations. More...
 
template<class MatT , class VecT , class VecT2 >
void approxsolveSymmPosDefSystem (matrix_expression< MatT > const &A, vector_expression< VecT > &x, vector_expression< VecT2 > const &b, double epsilon=1.e-10, bool initialSolution=false, unsigned int maxIterations=0)
 Approximates the solution of a linear system of equation Ax=b. More...
 
template<class MatT , class VecT >
void approxsolveSymmPosDefSystemInPlace (matrix_expression< MatT > const &A, vector_expression< VecT > &b, double epsilon=1.e-10, unsigned int maxIterations=0)
 Approximates the solution of a linear system of equation Ax=b, storing the solution in b. More...
 
template<class MatrixT , class MatrixU , class VectorT >
void svd (const MatrixT &amatA, MatrixU &umatA, MatrixU &vmatA, VectorT &wvecA, unsigned maxIterations=200, bool ignoreThreshold=true)
 
template<class Matrix >
vector_range< matrix_row< Matrix const > > triangularRow (matrix_expression< Matrix > const &mat, std::size_t i)
 Returns the ith row of an upper triangular matrix excluding the elements right of the diagonal. More...
 
template<class Matrix >
temporary_proxy< vector_range< matrix_row< Matrix > > > triangularRow (matrix_expression< Matrix > &mat, std::size_t i)
 Returns the ith row of an upper triangular matrix excluding the elements right of the diagonal. More...
 
template<class Matrix >
vector_range< matrix_row< Matrix const > > unitTriangularRow (matrix_expression< Matrix > const &mat, std::size_t i)
 Returns the elements in the ith row of a lower triangular matrix left of the diagonal. More...
 
template<class Matrix >
temporary_proxy< vector_range< matrix_row< Matrix > > > unitTriangularRow (matrix_expression< Matrix > &mat, std::size_t i)
 Returns the elements in the ith row of a lower triangular matrix left of the diagonal. More...
 
template<class Matrix >
vector_range< matrix_column< Matrix const > > unitTriangularColumn (matrix_expression< Matrix > const &mat, std::size_t i)
 Returns the elements in the i-th column of the matrix below the diagonal. More...
 
template<class Matrix >
temporary_proxy< vector_range< matrix_column< Matrix > > > unitTriangularColumn (matrix_expression< Matrix > &mat, std::size_t i)
 Returns the elements in the i-th column of the matrix below the diagonal. More...
 
template<class Matrix >
vector_range< matrix_column< Matrix const > > triangularColumn (matrix_expression< Matrix > const &mat, std::size_t i)
 Returns the elements in the i-th column of the matrix excluding the zero elements. More...
 
template<class Matrix >
vector_range< matrix_column< Matrix > > triangularColumn (matrix_expression< Matrix > &mat, std::size_t i)
 Returns the elements in the i-th column of the matrix excluding the zero elements. More...
 

Function Documentation

§ adapt_matrix() [1/2]

template<class T >
temporary_proxy< dense_matrix_adaptor<T> > shark::blas::adapt_matrix ( std::size_t  size1,
std::size_t  size2,
T *  data 
)

§ adapt_matrix() [2/2]

template<class T , std::size_t M, std::size_t N>
temporary_proxy<dense_matrix_adaptor<T> > shark::blas::adapt_matrix ( T(&)  array[M][N])

Converts a 2D C-style array into a matrix of given size.

Definition at line 1609 of file matrix_proxy.hpp.

§ adapt_vector() [1/2]

template<class T >
temporary_proxy<dense_vector_adaptor<T> > shark::blas::adapt_vector ( std::size_t  size,
T *  data 
)

Converts a chunk of memory into a vector of a given size.

Definition at line 578 of file vector_proxy.hpp.

References shark::blas::vector_reference< V >::size().

Referenced by shark::exportFiltersToPGMGrid().

§ adapt_vector() [2/2]

template<class T , std::size_t N>
temporary_proxy<dense_vector_adaptor<T> > shark::blas::adapt_vector ( T(&)  array[N])

Converts a C-style array into a vector.

Definition at line 584 of file vector_proxy.hpp.

§ arg_max()

§ arg_min()

template<class E >
std::size_t shark::blas::arg_min ( const vector_expression< E > &  e)

arg_min v = arg min_i v_i

Definition at line 713 of file vector_expression.hpp.

References arg_max(), shark::blas::vector_scalar_multiply< E >::size(), and SIZE_CHECK.

Referenced by shark::kMeans().

§ assign() [1/2]

template<class VecX , class VecV >
VecX& shark::blas::assign ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

§ assign() [2/2]

template<class MatA , class MatB >
MatA& shark::blas::assign ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Dispatches matrix assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 203 of file assignment.hpp.

References SIZE_CHECK.

Referenced by assign().

§ axpy_prod() [1/6]

template<class ResultV , class M , class V >
void shark::blas::axpy_prod ( matrix_expression< M > const &  matrix,
vector_expression< V > const &  vector,
vector_expression< ResultV > &  result,
bool  init = true,
typename ResultV::value_type  alpha = 1.0 
)

§ axpy_prod() [2/6]

template<class ResultV , class M , class V >
void shark::blas::axpy_prod ( matrix_expression< M > const &  matrix,
vector_expression< V > const &  vector,
temporary_proxy< ResultV >  result,
bool  init = true,
typename ResultV::value_type  alpha = 1.0 
)

Computes C=alpha*Ax or C += alpha*Ax.

This the dispatcher for temporary result proxies

Definition at line 104 of file operation.hpp.

References axpy_prod(), shark::size(), and SIZE_CHECK.

§ axpy_prod() [3/6]

template<class ResultV , class V , class M >
void shark::blas::axpy_prod ( vector_expression< V > const &  vector,
matrix_expression< M > const &  matrix,
vector_expression< ResultV > &  result,
bool  init = true,
typename ResultV::value_type  alpha = 1.0 
)

Computes y=alpha*xA or y += alpha*xA.

Definition at line 118 of file operation.hpp.

References axpy_prod(), shark::size(), SIZE_CHECK, and trans().

§ axpy_prod() [4/6]

template<class ResultV , class M , class V >
void shark::blas::axpy_prod ( vector_expression< V > const &  vector,
matrix_expression< M > const &  matrix,
temporary_proxy< ResultV >  result,
bool  init = true,
typename ResultV::value_type  alpha = 1.0 
)

Computes C=alpha*xA or C += alpha*xA.

This the dispatcher for temporary result proxies

Definition at line 134 of file operation.hpp.

References axpy_prod(), shark::size(), SIZE_CHECK, and trans().

§ axpy_prod() [5/6]

template<class M , class E1 , class E2 >
void shark::blas::axpy_prod ( matrix_expression< E1 > const &  e1,
matrix_expression< E2 > const &  e2,
matrix_expression< M > &  m,
bool  init = true,
typename M::value_type  alpha = 1.0 
)

Implements the matrix products m+=alpha * e1*e2 or m = alpha*e1*e2.

Definition at line 148 of file operation.hpp.

References shark::blas::kernels::gemm(), and SIZE_CHECK.

§ axpy_prod() [6/6]

template<class M , class E1 , class E2 >
void shark::blas::axpy_prod ( matrix_expression< E1 > const &  e1,
matrix_expression< E2 > const &  e2,
temporary_proxy< M >  m,
bool  init = true,
typename M::value_type  alpha = 1.0 
)

Definition at line 166 of file operation.hpp.

References axpy_prod().

§ column() [1/3]

template<class M >
temporary_proxy<matrix_column<M> > shark::blas::column ( matrix_expression< M > &  expression,
typename M::index_type  j 
)

§ column() [2/3]

template<class M >
matrix_column<typename const_expression<M>::type> shark::blas::column ( matrix_expression< M > const &  expression,
typename M::index_type  j 
)

§ column() [3/3]

template<class M >
temporary_proxy<matrix_column<M> > shark::blas::column ( temporary_proxy< M >  expression,
typename M::index_type  j 
)

Definition at line 911 of file matrix_proxy.hpp.

References column().

§ columns() [1/3]

§ columns() [2/3]

template<class M >
matrix_range<typename const_expression<M>::type> shark::blas::columns ( matrix_expression< M > const &  expression,
typename M::index_type  start,
typename M::index_type  stop 
)

§ columns() [3/3]

template<class M >
temporary_proxy<matrix_range<M> > shark::blas::columns ( temporary_proxy< M >  expression,
std::size_t  start,
std::size_t  stop 
)

Definition at line 1371 of file matrix_proxy.hpp.

References columns().

§ diag() [1/3]

template<class M >
matrix_vector_range<typename const_expression<M>::type > shark::blas::diag ( matrix_expression< M > const &  mat)

Returns the diagonal of a constant square matrix as vector.

given a matrix A = (1 2 3) (4 5 6) (7 8 9)

the diag operation results in diag(A) = (1,5,9)

Definition at line 1059 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::size1(), shark::blas::matrix_reference< M >::size2(), and SIZE_CHECK.

Referenced by diag(), shark::CrossEntropy::evalDerivative(), shark::NormalDistributedPoints::NormalDistributedPoints(), randomRotationMatrix(), and shark::LassoRegression< InputVectorType >::trainInternal().

§ diag() [2/3]

template<class M >
temporary_proxy< matrix_vector_range<M> > shark::blas::diag ( matrix_expression< M > &  mat)

Returns the diagonal of a square matrix as vector.

given a matrix A = (1 2 3) (4 5 6) (7 8 9)

the diag operation results in diag(A) = (1,5,9)

Definition at line 1075 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::size1(), shark::blas::matrix_reference< M >::size2(), and SIZE_CHECK.

§ diag() [3/3]

template<class M >
temporary_proxy< matrix_vector_range<M> > shark::blas::diag ( temporary_proxy< M >  mat)

Definition at line 1082 of file matrix_proxy.hpp.

References diag().

§ diagonalMahalanobisNorm()

template<class VectorT , class WeightT >
VectorT::value_type shark::blas::diagonalMahalanobisNorm ( vector_expression< VectorT > const &  vector,
vector_expression< WeightT > const &  weights 
)

Normalized norm_2 (diagonal Mahalanobis).

Contrary to some conventions, dimension-wise weights are considered instead of std. deviations: \( n^2(v) = \sqrt{\sum_i w_i v_i^2} \) nb: the weights themselves are not squared, but multiplied onto the squared components

Definition at line 65 of file Metrics.h.

References diagonalMahalanobisDistanceSqr(), diagonalMahalanobisNormSqr(), inner_prod(), shark::size(), SIZE_CHECK, shark::sqr(), and sum().

§ diagonalMahalanobisNormSqr()

template<class VectorT , class WeightT >
VectorT::value_type shark::blas::diagonalMahalanobisNormSqr ( vector_expression< VectorT > const &  vector,
vector_expression< WeightT > const &  weights 
)

Normalized squared norm_2 (diagonal Mahalanobis).

Contrary to some conventions, dimension-wise weights are considered instead of std. deviations: \( n^2(v) = \sum_i w_i v_i^2 \) nb: the weights themselves are not squared, but multiplied onto the squared components

Definition at line 49 of file Metrics.h.

References inner_prod(), shark::size(), SIZE_CHECK, and shark::sqr().

Referenced by diagonalMahalanobisNorm().

§ divide_assign() [1/2]

template<class VecX , class VecV >
VecX& shark::blas::divide_assign ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

Dispatches vector multiply-assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 142 of file assignment.hpp.

References assign(), shark::blas::kernels::assign(), divide_assign(), minus_assign(), multiply_assign(), plus_assign(), shark::size(), and SIZE_CHECK.

Referenced by operator/=(), and shark::blas::noalias_proxy< C >::operator/=().

§ divide_assign() [2/2]

template<class MatA , class MatB >
MatA& shark::blas::divide_assign ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Dispatches matrix divide-assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 251 of file assignment.hpp.

References SIZE_CHECK.

Referenced by divide_assign().

§ eval_block() [1/2]

template<class E >
boost::mpl::eval_if< boost::is_same< typename E::evaluation_category, blockwise_tag >, vector_temporary<E>, boost::mpl::identity<E const&>>::type shark::blas::eval_block ( blas::vector_expression< E > const &  e)

conditionally evaluates a vector expression if it is a block expression

If the expression is a block expression, a temporary vector is created to which the expression is assigned, which is then returned, otherwise the expression itself is returned

Definition at line 584 of file assignment.hpp.

Referenced by frobenius_prod(), index_norm_inf(), inner_prod(), shark::blas::matrix_vector_prod< MatA, VecV >::minus_assign_to(), shark::blas::matrix_matrix_prod< MatA, MatB >::minus_assign_to(), norm_1(), norm_frobenius(), norm_inf(), norm_sqr(), shark::blas::matrix_vector_prod< MatA, VecV >::plus_assign_to(), and shark::blas::matrix_matrix_prod< MatA, MatB >::plus_assign_to().

§ eval_block() [2/2]

template<class E >
boost::mpl::eval_if< boost::is_same< typename E::evaluation_category, blockwise_tag >, matrix_temporary<E>, boost::mpl::identity<E const&>>::type shark::blas::eval_block ( blas::matrix_expression< E > const &  e)

conditionally evaluates a matrix expression if it is a block expression

If the expression is a block expression, a temporary matrix is created to which the expression is assigned, which is then returned, otherwise the expression itself is returned

Definition at line 601 of file assignment.hpp.

§ frobenius_prod()

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.

The frobenius inner product is defined as \( <A,B>_F=\sum_{ij} A_ij*B_{ij} \). It induces the Frobenius norm \( ||A||_F = \sqrt{<A,A>_F} \)

Definition at line 1233 of file matrix_expression.hpp.

References eval_block(), and sum().

Referenced by shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative().

§ index_norm_inf()

template<class E >
std::size_t shark::blas::index_norm_inf ( vector_expression< E > const &  e)

index_norm_inf v = arg max_i |v_i|

Definition at line 766 of file vector_expression.hpp.

References arg_max(), and eval_block().

Referenced by lu_factorize().

§ inner_prod()

template<class E1 , class E2 >
promote_traits< typename E1::value_type, typename E2::value_type>::promote_type shark::blas::inner_prod ( vector_expression< E1 > const &  e1,
vector_expression< E2 > const &  e2 
)

§ lu_factorize() [1/2]

template<class M >
M::size_type shark::blas::lu_factorize ( M &  m)

Definition at line 40 of file lu.hpp.

References column(), min(), noalias(), outer_prod(), row(), shark::size(), and subrange().

§ lu_factorize() [2/2]

template<class M , class PM >
M::size_type shark::blas::lu_factorize ( M &  m,
PM &  pm 
)

§ max() [1/2]

template<class E >
E::value_type shark::blas::max ( const vector_expression< E > &  e)

max v = max_i v_i

Definition at line 689 of file vector_expression.hpp.

§ max() [2/2]

template<class MatA >
MatA::value_type shark::blas::max ( matrix_expression< MatA > const &  A)

Definition at line 1218 of file matrix_expression.hpp.

Referenced by shark::SvmShrinkingProblem< Problem >::applyStep(), shark::binarySubProblem(), shark::QpMcLinearCS< InputT >::calcGradient(), shark::QpMcLinearADM< InputT >::calcGradient(), shark::QpMcLinearATM< InputT >::calcGradient(), shark::QpMcBoxDecomp< Matrix >::checkKKT(), shark::BoxConstrainedProblem< Problem >::checkKKT(), shark::SvmProblem< Problem >::checkKKT(), shark::QpMcSimplexDecomp< Matrix >::checkKKT(), shark::BoxConstraintHandler< SearchPointType >::closestFeasible(), shark::compare_fitness(), shark::CMA::condition(), shark::NestedGridSearch::configure(), shark::LeastContributorApproximator< Rng, ExactHypervolume >::DEFAULT_MAX_NUM_SAMPLES(), shark::BaseRng< RNG >::discrete(), shark::EpsilonHingeLoss::eval(), shark::SquaredEpsilonHingeLoss::eval(), shark::HingeLoss::eval(), shark::SquaredHingeLoss::eval(), shark::NegativeAUC< LabelType, OutputType >::eval(), shark::NegativeLogLikelihood::eval(), shark::LooErrorCSvm< InputType, CacheType >::eval(), shark::CrossEntropy::eval(), shark::NBClassifier< InputType, OutputType >::eval(), shark::EpsilonHingeLoss::evalDerivative(), shark::SquaredEpsilonHingeLoss::evalDerivative(), shark::NegativeLogLikelihood::evalDerivative(), shark::HingeLoss::evalDerivative(), shark::SquaredHingeLoss::evalDerivative(), shark::CrossEntropyIndependent::evalDerivative(), shark::CrossEntropy::evalDerivative(), shark::exportFiltersToPGMGrid(), shark::SimpleNearestNeighbors< InputType, LabelType >::getNeighbors(), shark::importCSV(), shark::VDCMA::init(), shark::JaakkolaHeuristic::JaakkolaHeuristic(), shark::kMeans(), shark::VDCMA::lambda(), shark::AdditiveEpsilonIndicator::leastContributor(), shark::LeastContributorApproximator< Rng, ExactHypervolume >::leastContributor(), shark::McPegasos< VectorType >::lossGradientADM(), shark::McPegasos< VectorType >::lossGradientATM(), shark::McPegasos< VectorType >::lossGradientRDM(), main(), shark::QpMcSimplexDecomp< Matrix >::maxGainSimplex(), shark::CrossEntropyMethod::ConstantNoise::noiseValue(), shark::CrossEntropyMethod::LinearNoise::noiseValue(), norm_inf(), shark::LabelOrder::normalizeLabels(), shark::numberOfClasses(), shark::TwoStateSpace< State1, State2 >::numberOfStates(), shark::InvertedGenerationalDistance::operator()(), shark::SimulatedBinaryCrossover< RealVector >::operator()(), shark::MultiplicativeEpsilonIndicator::operator()(), shark::AdditiveEpsilonIndicator::operator()(), shark::DiscreteUniform< RngType >::operator()(), shark::Uniform< RngType >::operator()(), shark::IndicatorBasedSelection< shark::HypervolumeIndicator >::operator()(), shark::BoundingBoxComputer< Set >::operator()(), shark::Truncate::operator()(), shark::TruncateAndRescale::operator()(), shark::TrainingError< PointType >::reset(), shark::GeneralizationLoss< PointType >::reset(), shark::GeneralizationQuotient< PointType >::reset(), shark::HMGSelectionCriterion::reset(), shark::safeExp(), shark::LeastContributorApproximator< Rng, ExactHypervolume >::sample(), shark::QpMcSimplexDecomp< Matrix >::selectWorkingSet(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::setMaxIterations(), shark::DiscreteUniform< RngType >::setRange(), shark::Uniform< RngType >::setRange(), shark::QpMcBoxDecomp< Matrix >::shrink(), shark::BoxConstrainedShrinkingProblem< Problem >::shrink(), soft_max(), shark::QpBoxLinear< InputT >::solve(), shark::QpMcLinear< InputT >::solve(), shark::QpBoxLinear< CompressedRealVector >::solve(), shark::BiasSolver< Matrix >::solve(), shark::BiasSolverSimplex< Matrix >::solve(), shark::NormalizeComponentsUnitInterval< DataType >::train(), shark::McSvmOVATrainer< InputType, CacheType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::LinearMcSvmOVATrainer< InputType >::train(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::train(), shark::LassoRegression< InputVectorType >::trainInternal(), shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM(), shark::BaseRng< RNG >::uni(), shark::BoxConstrainedShrinkingProblem< Problem >::updateGradientEdge(), shark::HypervolumeIndicator::updateInternals(), shark::LeastContributorApproximator< Rng, ExactHypervolume >::updateInternals(), and shark::SvmProblem< Problem >::updateSMO().

§ min() [1/2]

template<class E >
E::value_type shark::blas::min ( const vector_expression< E > &  e)

min v = min_i v_i

Definition at line 698 of file vector_expression.hpp.

§ min() [2/2]

template<class MatA >
MatA::value_type shark::blas::min ( matrix_expression< MatA > const &  A)

Definition at line 1223 of file matrix_expression.hpp.

Referenced by shark::SvmProblem< Problem >::applyStep(), shark::SvmShrinkingProblem< Problem >::applyStep(), shark::blas::kernels::assign(), shark::GridSearch::assignExponentialRange(), shark::binarySubProblem(), shark::SvmProblem< Problem >::checkKKT(), shark::LRUCache< QpFloatType >::clear(), shark::BoxConstraintHandler< SearchPointType >::closestFeasible(), shark::CMA::condition(), shark::GridSearch::configure(), shark::NestedGridSearch::configure(), shark::BaseRng< RNG >::discrete(), shark::LooErrorCSvm< InputType, CacheType >::eval(), shark::NegativeLogLikelihood::evalDerivative(), shark::SingleChainApproximator< MarkovChainType >::evalDerivative(), shark::exportFiltersToPGMGrid(), shark::ExactGradient< RBMType >::getLogPartition(), shark::SimpleNearestNeighbors< InputType, LabelType >::getNeighbors(), shark::VDCMA::init(), shark::PointSearch::init(), shark::JaakkolaHeuristic::JaakkolaHeuristic(), shark::VDCMA::lambda(), lu_factorize(), main(), shark::InvertedGenerationalDistance::operator()(), shark::UniformCrossover::operator()(), shark::SimulatedBinaryCrossover< RealVector >::operator()(), shark::MultiplicativeEpsilonIndicator::operator()(), shark::AdditiveEpsilonIndicator::operator()(), shark::DiscreteUniform< RngType >::operator()(), shark::Uniform< RngType >::operator()(), shark::LibSVMSelectionCriterion::operator()(), shark::Truncate::operator()(), shark::TruncateAndRescale::operator()(), shark::IterativeNNQuery< DataContainer >::queuesize(), shark::MergeBudgetMaintenanceStrategy< RealVector >::reduceBudget(), shark::blas::compressed_vector< T, I >::reserve(), shark::blas::compressed_matrix< T, I >::reserve_row(), shark::HMGSelectionCriterion::reset(), shark::HypervolumeCalculator::serialize(), shark::MultiChainApproximator< MarkovChainType >::setData(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::setMaxIterations(), shark::DiscreteUniform< RngType >::setRange(), shark::Uniform< RngType >::setRange(), shark::BoxConstrainedShrinkingProblem< Problem >::shrink(), shark::QpBoxLinear< InputT >::solve(), shark::QpMcLinear< InputT >::solve(), shark::QpBoxLinear< CompressedRealVector >::solve(), shark::TrainingProgress< PointType >::stop(), shark::GeneralizationLoss< PointType >::stop(), shark::GeneralizationQuotient< PointType >::stop(), shark::LMCMA::suggestLambda(), shark::NormalizeComponentsUnitInterval< DataType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::LassoRegression< InputVectorType >::trainInternal(), shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM(), shark::BaseRng< RNG >::uni(), shark::MultiNomialDistribution::update(), and shark::BoxConstrainedShrinkingProblem< Problem >::updateGradientEdge().

§ minus_assign() [1/2]

template<class VecX , class VecV >
VecX& shark::blas::minus_assign ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

Dispatches vector minus-assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 120 of file assignment.hpp.

References minus_assign(), shark::size(), and SIZE_CHECK.

Referenced by divide_assign(), shark::blas::vector_addition< E1, E2 >::minus_assign_to(), shark::blas::matrix_addition< E1, E2 >::minus_assign_to(), operator-=(), and shark::blas::noalias_proxy< C >::operator-=().

§ minus_assign() [2/2]

template<class MatA , class MatB >
MatA& shark::blas::minus_assign ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Dispatches matrix plus-assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 227 of file assignment.hpp.

References SIZE_CHECK.

Referenced by minus_assign().

§ multiply_assign() [1/2]

template<class VecX , class VecV >
VecX& shark::blas::multiply_assign ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

Dispatches vector multiply-assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 131 of file assignment.hpp.

References multiply_assign(), shark::size(), and SIZE_CHECK.

Referenced by divide_assign(), operator*=(), and shark::blas::noalias_proxy< C >::operator*=().

§ multiply_assign() [2/2]

template<class MatA , class MatB >
MatA& shark::blas::multiply_assign ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Dispatches matrix multiply-assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 239 of file assignment.hpp.

References SIZE_CHECK.

Referenced by multiply_assign().

§ noalias() [1/5]

template<class C >
noalias_proxy<C> shark::blas::noalias ( matrix_expression< C > &  lvalue)

Definition at line 542 of file assignment.hpp.

Referenced by shark::QpMcLinear< InputT >::add_scaled(), shark::ProjectBudgetMaintenanceStrategy< RealVector >::addToModel(), applyHouseholderOnTheLeft(), applyHouseholderOnTheRight(), approxsolveSymmPosDefSystem(), shark::calculateMixedKernelMatrix(), shark::calculateRegularizedKernelMatrix(), choleskyUpdate(), shark::RFClassifier::countAttributes(), createHouseholderReflection(), shark::NormalDistributedPoints::draw(), shark::GaussianLayer::energyTerm(), shark::BinaryLayer::energyTerm(), shark::MeanModel< CARTClassifier< RealVector > >::eval(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::LinearKernel< InputType >::eval(), shark::MonomialKernel< InputType >::eval(), shark::NearestNeighborRegression< InputType >::eval(), shark::NormalizedKernel< InputType >::eval(), shark::ProductKernel< InputType >::eval(), shark::ConvexCombination::eval(), shark::GaussianRbfKernel< InputType >::eval(), shark::PolynomialKernel< InputType >::eval(), shark::LinearModel< VectorType >::eval(), shark::KernelExpansion< RealVector >::eval(), shark::Normalizer< DataType >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::SquaredEpsilonHingeLoss::evalDerivative(), shark::HuberLoss::evalDerivative(), shark::SquaredLoss< OutputType, LabelType >::evalDerivative(), shark::ExactGradient< RBMType >::evalDerivative(), shark::TukeyBiweightLoss::evalDerivative(), shark::NegativeLogLikelihood::evalDerivative(), shark::SparseAutoencoderError::evalDerivative(), shark::SingleChainApproximator< MarkovChainType >::evalDerivative(), shark::ContrastiveDivergence< Operator >::evalDerivative(), shark::SquaredLoss< OutputType, unsigned int >::evalDerivative(), shark::CrossEntropy::evalDerivative(), shark::MultiChainApproximator< MarkovChainType >::evalDerivative(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::FFNet< HiddenNeuron, OutputNeuron >::evalLayer(), shark::GaussianLayer::expectedParameterDerivative(), shark::BipolarLayer::expectedParameterDerivative(), shark::BinaryLayer::expectedParameterDerivative(), shark::exportFiltersToPGMGrid(), shark::AbstractKernelFunction< InputType >::featureDistanceSqr(), shark::MultiVariateNormalDistributionCholesky::generate(), shark::EnergyStoringTemperedMarkovChain< Operator >::getDownDifferences(), shark::EnergyStoringTemperedMarkovChain< Operator >::getUpDifferences(), shark::MarkovChain< Operator >::initializeChain(), shark::TemperedMarkovChain< Operator >::initializeChain(), shark::RBM< VisibleLayerT, HiddenLayerT, RngT >::inputHidden(), shark::RBM< VisibleLayerT, HiddenLayerT, RngT >::inputVisible(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::inputVisible(), shark::kMeans(), shark::VDCMA::lambda(), shark::LMCMA::lambda(), lu_factorize(), shark::CSvmDerivative< InputType, CacheType >::modelCSvmParameterDerivative(), shark::CMAIndividual< double >::mutate(), shark::GaussianLayer::parameterDerivative(), shark::BipolarLayer::parameterDerivative(), shark::BinaryLayer::parameterDerivative(), pivotingCholeskyDecomposition(), shark::ARDKernelUnconstrained< InputType >::read(), shark::HypervolumeCalculator::serialize(), shark::ARDKernelUnconstrained< InputType >::setGammaVector(), shark::FFNet< HiddenNeuron, OutputNeuron >::setLayer(), shark::ARDKernelUnconstrained< InputType >::setParameterVector(), shark::ConvexCombination::setParameterVector(), shark::FFNet< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::Pegasos< VectorType >::solve(), shark::McPegasos< VectorType >::solve(), shark::KernelExpansion< RealVector >::sparsify(), shark::EnergyStoringTemperedMarkovChain< Operator >::step(), shark::GaussianLayer::sufficientStatistics(), shark::BipolarLayer::sufficientStatistics(), shark::BinaryLayer::sufficientStatistics(), shark::TruncatedExponentialLayer::sufficientStatistics(), shark::NormalizeComponentsWhitening::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::LassoRegression< InputVectorType >::trainInternal(), shark::CMAChromosome::updateAsOffspring(), shark::HypervolumeIndicator::updateInternals(), shark::LeastContributorApproximator< Rng, ExactHypervolume >::updateInternals(), shark::IndicatorBasedMOCMA< Indicator >::updatePopulation(), shark::IndicatorBasedRealCodedNSGAII< Indicator >::updatePopulation(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedDerivatives(), shark::LinearKernel< InputType >::weightedInputDerivative(), shark::MonomialKernel< InputType >::weightedInputDerivative(), shark::ConvexCombination::weightedInputDerivative(), shark::GaussianRbfKernel< InputType >::weightedInputDerivative(), shark::LinearModel< VectorType >::weightedInputDerivative(), shark::NormalizedKernel< InputType >::weightedInputDerivative(), shark::PolynomialKernel< InputType >::weightedInputDerivative(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedInputDerivative(), shark::ConvexCombination::weightedParameterDerivative(), shark::LinearModel< VectorType >::weightedParameterDerivative(), shark::NormalizedKernel< InputType >::weightedParameterDerivative(), shark::WeightedSumKernel< InputType >::weightedParameterDerivative(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedParameterDerivative(), shark::CSvmDerivative< InputType, CacheType >::write(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::write(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::write(), and shark::FFNet< HiddenNeuron, OutputNeuron >::write().

§ noalias() [2/5]

template<class C >
noalias_proxy<C> shark::blas::noalias ( vector_expression< C > &  lvalue)

Definition at line 546 of file assignment.hpp.

§ noalias() [3/5]

template<class C >
noalias_proxy<C> shark::blas::noalias ( matrix_set_expression< C > &  lvalue)

Definition at line 551 of file assignment.hpp.

§ noalias() [4/5]

template<class C >
noalias_proxy<C> shark::blas::noalias ( vector_set_expression< C > &  lvalue)

Definition at line 555 of file assignment.hpp.

§ noalias() [5/5]

template<class C >
noalias_proxy<C> shark::blas::noalias ( temporary_proxy< C >  lvalue)

Definition at line 559 of file assignment.hpp.

§ norm_1() [1/2]

template<class E >
real_traits<typename E::value_type >::type shark::blas::norm_1 ( const vector_expression< E > &  e)

norm_1 v = sum_i |v_i|

Definition at line 738 of file vector_expression.hpp.

References eval_block(), and sum().

§ norm_1() [2/2]

template<class E >
matrix_norm_1<E>::result_type shark::blas::norm_1 ( const matrix_expression< E > &  e)

§ norm_2()

template<class E >
real_traits<typename E::value_type >::type shark::blas::norm_2 ( const vector_expression< E > &  e)

§ norm_frobenius()

template<class E >
real_traits<typename E::value_type>::type shark::blas::norm_frobenius ( const matrix_expression< E > &  e)

Definition at line 1249 of file matrix_expression.hpp.

References eval_block(), and sum().

§ norm_inf() [1/2]

template<class E >
real_traits<typename E::value_type >::type shark::blas::norm_inf ( vector_expression< E > const &  e)

norm_inf v = max_i |v_i|

Definition at line 760 of file vector_expression.hpp.

References eval_block(), and max().

§ norm_inf() [2/2]

template<class E >
matrix_norm_inf<E>::result_type shark::blas::norm_inf ( const matrix_expression< E > &  e)

§ norm_sqr()

§ operator*() [1/4]

template<class T , class E >
boost::enable_if< boost::is_convertible<T, typename E::scalar_type >, vector_scalar_multiply<E>>::type shark::blas::operator* ( vector_expression< E > const &  e,
scalar 
)

Definition at line 127 of file vector_expression.hpp.

§ operator*() [2/4]

template<class T , class E >
boost::enable_if< boost::is_convertible<T, typename E::scalar_type >, vector_scalar_multiply<E>>::type shark::blas::operator* ( scalar,
vector_expression< E > const &  e 
)

Definition at line 136 of file vector_expression.hpp.

§ operator*() [3/4]

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

Definition at line 482 of file matrix_expression.hpp.

§ operator*() [4/4]

template<class T , class E >
boost::enable_if< boost::is_convertible<T, typename E::scalar_type >, matrix_scalar_multiply<E> >::type shark::blas::operator* ( scalar,
matrix_expression< E > const &  e 
)

Definition at line 491 of file matrix_expression.hpp.

§ operator*=() [1/5]

template<class VecX , class VecV >
VecX& shark::blas::operator*= ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

Multiply-Assigns two vector expressions.

Performs the operation x_i*=v_i for all elements. Assumes that the right and left hand side aliases and therefore performs a copy of the right hand side before assigning use noalias as in noalias(x)*=v to avoid this if A and B do not alias

Definition at line 295 of file assignment.hpp.

References multiply_assign(), shark::size(), and SIZE_CHECK.

§ operator*=() [2/5]

template<class VecX >
VecX& shark::blas::operator*= ( vector_expression< VecX > &  x,
typename VecX::scalar_type  t 
)

Multiplies a scalar with all elements of the vector.

Performs the operation x_i *= t for all elements.

Definition at line 336 of file assignment.hpp.

§ operator*=() [3/5]

template<class MatA , class MatB >
MatA& shark::blas::operator*= ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Multiply-Assigns two matrix expressions.

Performs the operation A_ij*=B_ij for all elements. Assumes that the right and left hand side aliases and therefore performs a copy of the right hand side before assigning use noalias as in noalias(A)*=B to avoid this if A and B do not alias

Definition at line 391 of file assignment.hpp.

References multiply_assign(), and SIZE_CHECK.

§ operator*=() [4/5]

template<class MatA >
MatA& shark::blas::operator*= ( matrix_expression< MatA > &  A,
typename MatA::scalar_type  t 
)

Multiplies a scalar to all elements of the matrix.

Performs the operation A_ij *= t for all elements.

Definition at line 434 of file assignment.hpp.

§ operator*=() [5/5]

template<class T , class U >
temporary_proxy<T> shark::blas::operator*= ( temporary_proxy< T >  x,
U const &  arg 
)

Definition at line 465 of file assignment.hpp.

§ operator+() [1/6]

template<class E1 , class E2 >
vector_addition<E1, E2 > shark::blas::operator+ ( vector_expression< E1 > const &  e1,
vector_expression< E2 > const &  e2 
)

Adds two vectors.

Definition at line 488 of file vector_expression.hpp.

§ operator+() [2/6]

template<class E , class T >
boost::enable_if< boost::is_convertible<T, typename E::value_type>, vector_addition<E, scalar_vector<T> >>::type shark::blas::operator+ ( vector_expression< E > const &  e,
t 
)

Adds a vector plus a scalr which is interpreted as a constant vector.

Definition at line 508 of file vector_expression.hpp.

§ operator+() [3/6]

template<class T , class E >
boost::enable_if< boost::is_convertible<T, typename E::value_type>, vector_addition<E, scalar_vector<T> >>::type shark::blas::operator+ ( t,
vector_expression< E > const &  e 
)

Adds a vector plus a scalar which is interpreted as a constant vector.

Definition at line 520 of file vector_expression.hpp.

§ operator+() [4/6]

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.

Definition at line 683 of file matrix_expression.hpp.

§ operator+() [5/6]

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 
)

Adds a matrix plus a scalar which is interpreted as a constant matrix.

Definition at line 704 of file matrix_expression.hpp.

§ operator+() [6/6]

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,
matrix_expression< E > const &  e 
)

Adds a matrix plus a scalar which is interpreted as a constant matrix.

Definition at line 716 of file matrix_expression.hpp.

§ operator+=() [1/5]

template<class VecX , class VecV >
VecX& shark::blas::operator+= ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

Add-Assigns two vector expressions.

Performs the operation x_i+=v_i for all elements. Assumes that the right and left hand side aliases and therefore performs a copy of the right hand side before assigning use noalias as in noalias(x)+=v to avoid this if A and B do not alias

Definition at line 269 of file assignment.hpp.

References plus_assign(), shark::size(), and SIZE_CHECK.

§ operator+=() [2/5]

template<class VecX >
VecX& shark::blas::operator+= ( vector_expression< VecX > &  x,
typename VecX::scalar_type  t 
)

Adds a scalar to all elements of the vector.

Performs the operation x_i += t for all elements.

Definition at line 318 of file assignment.hpp.

§ operator+=() [3/5]

template<class MatA , class MatB >
MatA& shark::blas::operator+= ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Add-Assigns two matrix expressions.

Performs the operation A_ij+=B_ij for all elements. Assumes that the right and left hand side aliases and therefore performs a copy of the right hand side before assigning use noalias as in noalias(A)+=B to avoid this if A and B do not alias

Definition at line 363 of file assignment.hpp.

References plus_assign(), and SIZE_CHECK.

§ operator+=() [4/5]

template<class MatA >
MatA& shark::blas::operator+= ( matrix_expression< MatA > &  A,
typename MatA::scalar_type  t 
)

Adds a scalar to all elements of the matrix.

Performs the operation A_ij += t for all elements.

Definition at line 416 of file assignment.hpp.

§ operator+=() [5/5]

template<class T , class U >
temporary_proxy<T> shark::blas::operator+= ( temporary_proxy< T >  x,
U const &  arg 
)

Definition at line 455 of file assignment.hpp.

§ operator-() [1/8]

template<class E >
vector_scalar_multiply<E> shark::blas::operator- ( vector_expression< E > const &  e)

Definition at line 142 of file vector_expression.hpp.

§ operator-() [2/8]

template<class E >
matrix_scalar_multiply<E> shark::blas::operator- ( matrix_expression< E > const &  e)

Definition at line 496 of file matrix_expression.hpp.

§ operator-() [3/8]

template<class E1 , class E2 >
vector_addition<E1, vector_scalar_multiply<E2> > shark::blas::operator- ( vector_expression< E1 > const &  e1,
vector_expression< E2 > const &  e2 
)

Subtracts two vectors.

Definition at line 496 of file vector_expression.hpp.

§ operator-() [4/8]

template<class E , class T >
boost::enable_if< boost::is_convertible<T, typename E::value_type> , vector_addition<E, vector_scalar_multiply<scalar_vector<T> > >>::type shark::blas::operator- ( vector_expression< E > const &  e,
t 
)

Subtracts a scalar which is interpreted as a constant vector from a vector.

Definition at line 532 of file vector_expression.hpp.

§ operator-() [5/8]

template<class E , class T >
boost::enable_if< boost::is_convertible<T, typename E::value_type>, vector_addition<scalar_vector<T>, vector_scalar_multiply<E> >>::type shark::blas::operator- ( t,
vector_expression< E > const &  e 
)

Subtracts a vector from a scalar which is interpreted as a constant vector.

Definition at line 544 of file vector_expression.hpp.

§ operator-() [6/8]

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.

Definition at line 692 of file matrix_expression.hpp.

§ operator-() [7/8]

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 
)

Subtracts a scalar which is interpreted as a constant matrix from a matrix.

Definition at line 728 of file matrix_expression.hpp.

§ operator-() [8/8]

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,
matrix_expression< E > const &  e 
)

Subtracts a matrix from a scalar which is interpreted as a constant matrix.

Definition at line 740 of file matrix_expression.hpp.

§ operator-=() [1/5]

template<class VecX , class VecV >
VecX& shark::blas::operator-= ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

Subtract-Assigns two vector expressions.

Performs the operation x_i-=v_i for all elements. Assumes that the right and left hand side aliases and therefore performs a copy of the right hand side before assigning use noalias as in noalias(x)-=v to avoid this if A and B do not alias

Definition at line 282 of file assignment.hpp.

References minus_assign(), shark::size(), and SIZE_CHECK.

§ operator-=() [2/5]

template<class VecX >
VecX& shark::blas::operator-= ( vector_expression< VecX > &  x,
typename VecX::scalar_type  t 
)

Subtracts a scalar from all elements of the vector.

Performs the operation x_i += t for all elements.

Definition at line 327 of file assignment.hpp.

§ operator-=() [3/5]

template<class MatA , class MatB >
MatA& shark::blas::operator-= ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Subtract-Assigns two matrix expressions.

Performs the operation A_ij-=B_ij for all elements. Assumes that the right and left hand side aliases and therefore performs a copy of the right hand side before assigning use noalias as in noalias(A)-=B to avoid this if A and B do not alias

Definition at line 377 of file assignment.hpp.

References minus_assign(), and SIZE_CHECK.

§ operator-=() [4/5]

template<class MatA >
MatA& shark::blas::operator-= ( matrix_expression< MatA > &  A,
typename MatA::scalar_type  t 
)

Subtracts a scalar from all elements of the matrix.

Performs the operation A_ij -= t for all elements.

Definition at line 425 of file assignment.hpp.

§ operator-=() [5/5]

template<class T , class U >
temporary_proxy<T> shark::blas::operator-= ( temporary_proxy< T >  x,
U const &  arg 
)

Definition at line 460 of file assignment.hpp.

§ operator/=() [1/5]

template<class VecX , class VecV >
VecX& shark::blas::operator/= ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

Divide-Assigns two vector expressions.

Performs the operation x_i/=v_i for all elements. Assumes that the right and left hand side aliases and therefore performs a copy of the right hand side before assigning use noalias as in noalias(x)/=v to avoid this if A and B do not alias

Definition at line 308 of file assignment.hpp.

References divide_assign(), shark::size(), and SIZE_CHECK.

§ operator/=() [2/5]

template<class VecX >
VecX& shark::blas::operator/= ( vector_expression< VecX > &  x,
typename VecX::scalar_type  t 
)

Divides all elements of the vector by a scalar.

Performs the operation x_i /= t for all elements.

Definition at line 345 of file assignment.hpp.

§ operator/=() [3/5]

template<class MatA , class MatB >
MatA& shark::blas::operator/= ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Divide-Assigns two matrix expressions.

Performs the operation A_ij/=B_ij for all elements. Assumes that the right and left hand side aliases and therefore performs a copy of the right hand side before assigning use noalias as in noalias(A)/=B to avoid this if A and B do not alias

Definition at line 405 of file assignment.hpp.

References divide_assign(), and SIZE_CHECK.

§ operator/=() [4/5]

template<class MatA >
MatA& shark::blas::operator/= ( matrix_expression< MatA > &  A,
typename MatA::scalar_type  t 
)

Divides all elements of the matrix by a scalar.

Performs the operation A_ij /= t for all elements.

Definition at line 443 of file assignment.hpp.

§ operator/=() [5/5]

template<class T , class U >
temporary_proxy<T> shark::blas::operator/= ( temporary_proxy< T >  x,
U const &  arg 
)

Definition at line 470 of file assignment.hpp.

§ operator<<() [1/2]

template<class E , class T , class VE >
std::basic_ostream<E, T>& shark::blas::operator<< ( std::basic_ostream< E, T > &  os,
const vector_expression< VE > &  v 
)

output stream operator for vector expressions

Any vector expressions can be written to a standard output stream as defined in the C++ standard library. For exaboost::mple:

vector<float> v1(3),v2(3);
for(size_t i=0; i<3; i++)
{
v1(i) = i+0.2;
v2(i) = i+0.3;
}
cout << v1+v2 << endl;

will display the some of the 2 vectors like this:

[3](0.5,2.5,4.5)
Parameters
osis a standard basic output stream
vis a vector expression
Returns
a reference to the resulting output stream

Definition at line 63 of file io.hpp.

References shark::size().

§ operator<<() [2/2]

template<class E , class T , class ME >
std::basic_ostream<E, T>& shark::blas::operator<< ( std::basic_ostream< E, T > &  os,
const matrix_expression< ME > &  m 
)

output stream operator for matrix expressions

it outputs the content of a \( (M \times N) \) matrix to a standard output stream using the following format: (rows),)(columns)

For exaboost::mple:

matrix<float> m(3,3) = scalar_matrix<float>(3,3,1.0) - diagonal_matrix<float>(3,3,1.0);
cout << m << endl;
\encode
will display
\code
[3,3]((0,1,1),(1,0,1),(1,1,0))

This output is made for storing and retrieving matrices in a siboost::mple way but you can easily recognize the following:

\[ \left( \begin{array}{ccc} 1 & 1 & 1\\ 1 & 1 & 1\\ 1 & 1 & 1 \end{array} \right) - \left( \begin{array}{ccc} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1 \end{array} \right) = \left( \begin{array}{ccc} 0 & 1 & 1\\ 1 & 0 & 1\\ 1 & 1 & 0 \end{array} \right) \]

Parameters
osis a standard basic output stream
mis a matrix expression
Returns
a reference to the resulting output stream

Definition at line 105 of file io.hpp.

§ outer_prod()

§ plus_assign() [1/2]

template<class VecX , class VecV >
VecX& shark::blas::plus_assign ( vector_expression< VecX > &  x,
vector_expression< VecV > const &  v 
)

Dispatches vector plus-assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 109 of file assignment.hpp.

References plus_assign(), shark::size(), and SIZE_CHECK.

Referenced by shark::blas::vector_addition< E1, E2 >::assign_to(), shark::blas::matrix_addition< E1, E2 >::assign_to(), divide_assign(), operator+=(), shark::blas::noalias_proxy< C >::operator+=(), shark::blas::vector_addition< E1, E2 >::plus_assign_to(), and shark::blas::matrix_addition< E1, E2 >::plus_assign_to().

§ plus_assign() [2/2]

template<class MatA , class MatB >
MatA& shark::blas::plus_assign ( matrix_expression< MatA > &  A,
matrix_expression< MatB > const &  B 
)

Dispatches matrix plus-assignment on an expression level.

This dispatcher takes care for whether the blockwise evaluation or the elementwise evaluation is called

Definition at line 215 of file assignment.hpp.

References SIZE_CHECK.

Referenced by plus_assign().

§ prod() [1/3]

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

Definition at line 946 of file matrix_expression.hpp.

Referenced by applyHouseholderOnTheLeft(), applyHouseholderOnTheRight(), approxsolveSymmPosDefSystem(), createData(), shark::GaussianLayer::energyTerm(), shark::TruncatedExponentialLayer::energyTerm(), shark::BipolarLayer::energyTerm(), shark::BinaryLayer::energyTerm(), shark::RotatedObjectiveFunction::eval(), shark::LinearKernel< InputType >::eval(), shark::CIGTAB1::eval(), shark::CIGTAB2::eval(), shark::IHR1::eval(), shark::IHR3::eval(), shark::IHR4::eval(), shark::ELLI1::eval(), shark::IHR2::eval(), shark::ELLI2::eval(), shark::IHR6::eval(), shark::MonomialKernel< InputType >::eval(), shark::ProductKernel< InputType >::eval(), shark::ConvexCombination::eval(), shark::PolynomialKernel< InputType >::eval(), shark::LinearModel< VectorType >::eval(), shark::KernelExpansion< RealVector >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::evalDerivative(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::FFNet< HiddenNeuron, OutputNeuron >::evalLayer(), shark::GaussianLayer::expectedParameterDerivative(), shark::BipolarLayer::expectedParameterDerivative(), shark::BinaryLayer::expectedParameterDerivative(), shark::MultiVariateNormalDistributionCholesky::generate(), shark::RBM< VisibleLayerT, HiddenLayerT, RngT >::inputHidden(), shark::RBM< VisibleLayerT, HiddenLayerT, RngT >::inputVisible(), shark::Erlang_distribution< RealType >::operator()(), shark::GaussianLayer::parameterDerivative(), shark::BipolarLayer::parameterDerivative(), shark::BinaryLayer::parameterDerivative(), shark::RotatedObjectiveFunction::proposeStartingPoint(), shark::QpMcLinear< InputT >::solve(), shark::NormalizeComponentsWhitening::train(), shark::NormalizeComponentsZCA::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::LinearKernel< InputType >::weightedInputDerivative(), shark::MonomialKernel< InputType >::weightedInputDerivative(), shark::ConvexCombination::weightedInputDerivative(), shark::GaussianRbfKernel< InputType >::weightedInputDerivative(), shark::LinearModel< VectorType >::weightedInputDerivative(), shark::PolynomialKernel< InputType >::weightedInputDerivative(), shark::ConvexCombination::weightedParameterDerivative(), shark::LinearModel< VectorType >::weightedParameterDerivative(), shark::CSvmDerivative< InputType, CacheType >::write(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::write(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::write(), and shark::FFNet< HiddenNeuron, OutputNeuron >::write().

§ prod() [2/3]

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

Definition at line 952 of file matrix_expression.hpp.

References trans().

§ prod() [3/3]

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

Definition at line 1032 of file matrix_expression.hpp.

§ repeat() [1/3]

template<class T >
boost::enable_if<boost::is_arithmetic<T>, scalar_vector<T> >::type shark::blas::repeat ( scalar,
std::size_t  elements 
)

Creates a vector having a constant value.

Parameters
scalarthe value which is repeated
elementsthe size of the resulting vector

Definition at line 216 of file vector_expression.hpp.

§ repeat() [2/3]

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.

example: vector = (1,2,3) repeat(vector,3) results in (1,2,3) (1,2,3) (1,2,3)

Parameters
vectorthe vector which is to be repeated as the rows of the resulting matrix
rowsthe number of rows of the matrix

Definition at line 220 of file matrix_expression.hpp.

References rows().

Referenced by shark::GibbsOperator< RBMType >::createSample(), shark::Energy< RBM >::energyFromHiddenInput(), shark::Energy< RBM >::energyFromVisibleInput(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::LinearModel< VectorType >::eval(), shark::KernelExpansion< RealVector >::eval(), shark::Normalizer< DataType >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::ExactGradient< RBMType >::evalDerivative(), shark::ContrastiveDivergence< Operator >::evalDerivative(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::FFNet< HiddenNeuron, OutputNeuron >::evalLayer(), shark::ExactGradient< RBMType >::getLogPartition(), shark::VDCMA::init(), shark::LMCMA::init(), shark::negativeLogLikelihoodFromLogPartition(), shark::NormalDistributedPoints::NormalDistributedPoints(), randomRotationMatrix(), shark::MultiVariateNormalDistribution::resize(), shark::CrossEntropyMethod::setVariance(), shark::MarkovChain< Operator >::step(), shark::LassoRegression< InputVectorType >::trainInternal(), and shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM().

§ repeat() [3/3]

template<class T >
boost::enable_if<boost::is_arithmetic<T>, scalar_matrix<T> >::type shark::blas::repeat ( scalar,
std::size_t  rows,
std::size_t  columns 
)

brief repeats a single element to form a matrix of size rows x columns

Parameters
scalarthe value which is repeated
rowsthe number of rows of the resulting vector
columnsthe number of columns of the resulting vector

Definition at line 306 of file matrix_expression.hpp.

References columns(), and rows().

§ row() [1/3]

template<class M >
temporary_proxy< matrix_row<M> > shark::blas::row ( matrix_expression< M > &  expression,
typename M::index_type  i 
)

Definition at line 685 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression().

Referenced by shark::QpMcLinear< InputT >::add_scaled(), shark::RemoveBudgetMaintenanceStrategy< InputType >::addToModel(), shark::ProjectBudgetMaintenanceStrategy< RealVector >::addToModel(), shark::MergeBudgetMaintenanceStrategy< RealVector >::addToModel(), shark::blas::kernels::assign(), shark::GruauPole::balanceFit(), shark::blas::compressed_matrix< T, I >::clear_range(), shark::Energy< RBM >::energyFromHiddenInput(), shark::Energy< RBM >::energyFromVisibleInput(), shark::GaussianLayer::energyTerm(), shark::estimateLogFreeEnergyFromEnergySamples(), shark::HuberLoss::eval(), shark::TukeyBiweightLoss::eval(), shark::SquaredLoss< OutputType, LabelType >::eval(), shark::AbsoluteLoss< VectorType >::eval(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::CrossEntropy::eval(), shark::SquaredLoss< OutputType, unsigned int >::eval(), shark::NearestNeighborRegression< InputType >::eval(), shark::CARTClassifier< RealVector >::eval(), shark::SoftNearestNeighborClassifier< InputType >::eval(), shark::NonMarkovPole::eval(), shark::NormalizedKernel< InputType >::eval(), shark::ArgMaxConverter< KernelExpansion< InputType > >::eval(), shark::SquaredEpsilonHingeLoss::evalDerivative(), shark::HuberLoss::evalDerivative(), shark::TukeyBiweightLoss::evalDerivative(), shark::CrossEntropy::evalDerivative(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::exportFiltersToPGMGrid(), shark::AbstractKernelFunction< InputType >::featureDistanceSqr(), shark::AbstractBudgetMaintenanceStrategy< RealVector >::findSmallestVector(), shark::GruauPole::generalFit(), shark::getColumn(), shark::ExactGradient< RBMType >::getLogPartition(), shark::QpMcBoxDecomp< Matrix >::gradientUpdate(), shark::QpMcSimplexDecomp< Matrix >::gradientUpdate(), shark::GruauPole::gruauFit(), shark::IHR3::init(), shark::IHR4::init(), shark::IHR1::init(), shark::IHR2::init(), shark::IHR6::init(), shark::MarkovChain< Operator >::initializeChain(), shark::TemperedMarkovChain< Operator >::initializeChain(), shark::blas::compressed_matrix< T, I >::inner_nnz(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::inputHidden(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::inputVisible(), shark::JaakkolaHeuristic::JaakkolaHeuristic(), shark::Energy< RBM >::logUnnormalizedProbabilityHidden(), shark::Energy< RBM >::logUnnormalizedProbabilityVisible(), lu_factorize(), main(), shark::QpMcSimplexDecomp< Matrix >::maxGainBox(), shark::QpMcSimplexDecomp< Matrix >::maxGainSimplex(), shark::CSvmDerivative< InputType, CacheType >::modelCSvmParameterDerivative(), shark::MergeBudgetMaintenanceStrategy< RealVector >::reduceBudget(), shark::blas::compressed_matrix< T, I >::reserve_row(), row(), shark::blas::compressed_matrix< T, I >::row_capacity(), shark::QpMcBoxDecomp< Matrix >::selectWorkingSet(), shark::QpMcDecomp< Matrix >::selectWorkingSet(), shark::blas::compressed_matrix< T, I >::set_element(), shark::setColumn(), shark::ConvexCombination::setParameterVector(), shark::AbstractClustering< RealVector >::softMembership(), shark::QpMcLinear< InputT >::solve(), shark::QpMcDecomp< Matrix >::solve(), shark::BiasSolver< Matrix >::solve(), shark::BiasSolverSimplex< Matrix >::solve(), shark::QpMcDecomp< Matrix >::solveForBias(), shark::QpMcDecomp< Matrix >::solveSMO(), shark::KernelExpansion< RealVector >::sparsify(), shark::BipolarLayer::sufficientStatistics(), shark::GaussianLayer::sufficientStatistics(), shark::BinaryLayer::sufficientStatistics(), shark::TruncatedExponentialLayer::sufficientStatistics(), shark::LassoRegression< InputVectorType >::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::LinearMcSvmOVATrainer< InputType >::train(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::train(), shark::LinearCSvmTrainer< InputType >::train(), shark::SquaredHingeLinearCSvmTrainer< InputType >::train(), shark::LassoRegression< InputVectorType >::trainInternal(), triangularRow(), unitTriangularRow(), shark::QpMcBoxDecomp< Matrix >::unshrink(), shark::QpMcSimplexDecomp< Matrix >::unshrink(), shark::QpMcDecomp< Matrix >::unshrink(), shark::GaussianRbfKernel< InputType >::weightedInputDerivative(), shark::ARDKernelUnconstrained< InputType >::weightedInputDerivative(), shark::NormalizedKernel< InputType >::weightedInputDerivative(), shark::ConvexCombination::weightedParameterDerivative(), shark::ARDKernelUnconstrained< InputType >::weightedParameterDerivative(), and shark::FFNet< HiddenNeuron, OutputNeuron >::write().

§ row() [2/3]

template<class M >
matrix_row<typename const_expression<M>::type> shark::blas::row ( matrix_expression< M > const &  expression,
typename M::index_type  i 
)

§ row() [3/3]

template<class M >
temporary_proxy<matrix_row<M> > shark::blas::row ( temporary_proxy< M >  expression,
typename M::index_type  i 
)

Definition at line 695 of file matrix_proxy.hpp.

References row().

§ rows() [1/3]

§ rows() [2/3]

template<class M >
matrix_range<typename const_expression<M>::type> shark::blas::rows ( matrix_expression< M > const &  expression,
std::size_t  start,
std::size_t  stop 
)

§ rows() [3/3]

template<class M >
temporary_proxy<matrix_range<M> > shark::blas::rows ( temporary_proxy< M >  expression,
std::size_t  start,
std::size_t  stop 
)

Definition at line 1343 of file matrix_proxy.hpp.

References rows().

§ safe_div() [1/2]

template<class E1 , class E2 >
vector_binary<E1, E2, scalar_binary_safe_divide<typename E1::value_type, typename E2::value_type> > shark::blas::safe_div ( vector_expression< E1 > const &  e1,
vector_expression< E2 > const &  e2,
typename promote_traits< typename E1::value_type, typename E2::value_type >::promote_type  defaultValue 
)

Definition at line 663 of file vector_expression.hpp.

§ safe_div() [2/2]

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 
)

§ soft_max()

template<class E >
E::value_type shark::blas::soft_max ( const vector_expression< E > &  e)

soft_max v = ln(sum(exp(v)))

Be aware that this is NOT the same function as used in machine learning: exp(v)/sum(exp(v))

The function is computed in an numerically stable way to prevent that too high values of v_i produce inf or nan. The name of the function comes from the fact that it behaves like a continuous version of max in the respect that soft_max v <= v.size()*max(v) max is reached in the limit as the gap between the biggest value and the rest grows to infinity.

Definition at line 727 of file vector_expression.hpp.

References max(), and sum().

Referenced by shark::annealedImportanceSampling(), and shark::estimateLogFreeEnergyFromEnergySamples().

§ solveTriangularCholeskyInPlace() [1/2]

template<class System , class MatL , class MatB >
void shark::blas::solveTriangularCholeskyInPlace ( const matrix_expression< MatL > &  L,
matrix_expression< MatB > &  B 
)

In-Place solver if A was already cholesky decomposed Solves multiple systems of linear equations Ax_1=b_1 Ax_1=b_2 ... =>AX=B or XA=B given an A which was already Cholesky-decomposed as A=LL^T where L is a lower triangular matrix.

§ solveTriangularCholeskyInPlace() [2/2]

template<class System , class MatL , class VecB >
void shark::blas::solveTriangularCholeskyInPlace ( const matrix_expression< MatL > &  L,
vector_expression< VecB > &  b 
)

In-Place solver if A was already cholesky decomposed Solves system of linear equations Ax=b given an A which was already Cholesky-decomposed as A=LL^T where L is a lower triangular matrix.

§ solveTriangularSystemInPlace() [1/2]

template<class System , class DiagType , class MatT , class VecT >
void shark::blas::solveTriangularSystemInPlace ( const matrix_expression< MatT > &  A,
vector_expression< VecT > &  b 
)

In-place triangular linear equation solver.

solves a System of linear equations Ax=b or xA=b where A is a lower or upper triangular matrix The solution is stored in b afterwards. Be aware, that the matrix must have full rank! This call needs to template parameters indicating which type of system is to be solved : Ax=b or xA=b The second flag indicates which type of diagonal is used: lower unit, upper unit or non unit lower/upper.

§ solveTriangularSystemInPlace() [2/2]

template<class System , class DiagType , class MatA , class MatB >
void shark::blas::solveTriangularSystemInPlace ( const matrix_expression< MatA > &  A,
matrix_expression< MatB > &  B 
)

In-place triangular linear equation solver.

Solves multiple systems of linear equations Ax_1=b_1 Ax_1=b_2 ... =>AX=B or XA=B where A is a lower or upper triangular m x m matrix. And B = (b_1 b_2 ... b_n) is a m x n matrix. The result of X is stored in B afterwards. Be aware, that the matrix must have full rank! This call needs two template parameters indicating which type of system is to be solved : Ax=b or xA=b The second flag indicates which type of diagonal is used: lower unit, upper unit or non unit lower/upper.

§ subrange() [1/6]

template<class V >
temporary_proxy<vector_range<V> > shark::blas::subrange ( vector_expression< V > &  data,
typename V::size_type  start,
typename V::size_type  stop 
)

Return a vector_range on a specified vector, a start and stop index. Return a vector_range on a specified vector, a start and stop index. The resulting vector_range can be manipulated like a normal vector. If the specified range falls outside that of of the index range of the vector, then the resulting vector_range is not a well formed Vector Expression and access to an element outside of index range of the vector is undefined.

Definition at line 353 of file vector_proxy.hpp.

§ subrange() [2/6]

template<class V >
vector_range<typename const_expression<V>::type > shark::blas::subrange ( vector_expression< V > const &  data,
typename V::size_type  start,
typename V::size_type  stop 
)

Return a const vector_range on a specified vector, a start and stop index. Return a const vector_range on a specified vector, a start and stop index. The resulting const vector_range can be manipulated like a normal vector. If the specified range falls outside that of of the index range of the vector, then the resulting vector_range is not a well formed Vector Expression and access to an element outside of index range of the vector is undefined.

Definition at line 363 of file vector_proxy.hpp.

§ subrange() [3/6]

template<class V >
temporary_proxy<vector_range<V> > shark::blas::subrange ( temporary_proxy< V >  data,
typename V::size_type  start,
typename V::size_type  stop 
)

Definition at line 372 of file vector_proxy.hpp.

References subrange().

§ subrange() [4/6]

template<class M >
temporary_proxy< matrix_range<M> > shark::blas::subrange ( matrix_expression< M > &  expression,
std::size_t  start1,
std::size_t  stop1,
std::size_t  start2,
std::size_t  stop2 
)

Definition at line 1289 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::expression(), RANGE_CHECK, shark::blas::matrix_reference< M >::size1(), shark::blas::matrix_reference< M >::size2(), and SIZE_CHECK.

Referenced by shark::ProjectBudgetMaintenanceStrategy< RealVector >::addToModel(), shark::BarsAndStripes::BarsAndStripes(), shark::FFNet< HiddenNeuron, OutputNeuron >::bias(), shark::calculateKernelMatrixParameterDerivative(), shark::calculateMixedKernelMatrix(), shark::calculateRegularizedKernelMatrix(), choleskyUpdate(), columns(), createProblem(), shark::SvmLogisticInterpretation< InputType >::eval(), shark::KernelExpansion< RealVector >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::exportFiltersToPGMGrid(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::inputHidden(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::inputVisible(), shark::JaakkolaHeuristic::JaakkolaHeuristic(), lu_factorize(), shark::CSvmDerivative< InputType, CacheType >::modelCSvmParameterDerivative(), shark::WeightedSumKernel< InputType >::parameterVector(), randomRotationMatrix(), rows(), shark::FFNet< HiddenNeuron, OutputNeuron >::setLayer(), shark::OnlineRNNet::setOutputActivation(), shark::EpsilonSvmTrainer< InputType, CacheType >::setParameterVector(), shark::WeightedSumKernel< InputType >::setParameterVector(), subrange(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), triangularColumn(), triangularRow(), unitTriangularColumn(), unitTriangularRow(), shark::QpMcBoxDecomp< Matrix >::unshrink(), shark::QpMcSimplexDecomp< Matrix >::unshrink(), shark::LinearModel< VectorType >::weightedParameterDerivative(), shark::WeightedSumKernel< InputType >::weightedParameterDerivative(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::write(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::write(), and shark::FFNet< HiddenNeuron, OutputNeuron >::write().

§ subrange() [5/6]

template<class M >
matrix_range<typename const_expression<M>::type> shark::blas::subrange ( matrix_expression< M > const &  expression,
std::size_t  start1,
std::size_t  stop1,
std::size_t  start2,
std::size_t  stop2 
)

§ subrange() [6/6]

template<class M >
temporary_proxy< matrix_range<M> > shark::blas::subrange ( temporary_proxy< M >  expression,
std::size_t  start1,
std::size_t  stop1,
std::size_t  start2,
std::size_t  stop2 
)

Definition at line 1314 of file matrix_proxy.hpp.

References subrange().

§ sum() [1/2]

template<class E >
E::value_type shark::blas::sum ( const vector_expression< E > &  e)

sum v = sum_i v_i

Definition at line 680 of file vector_expression.hpp.

§ sum() [2/2]

template<class MatA >
MatA::value_type shark::blas::sum ( matrix_expression< MatA > const &  A)

Definition at line 1213 of file matrix_expression.hpp.

Referenced by diagonalMahalanobisNorm(), shark::EpsilonHingeLoss::eval(), shark::SquaredEpsilonHingeLoss::eval(), shark::DiffPowers::eval(), shark::Schwefel::eval(), shark::Cigar::eval(), shark::Discus::eval(), shark::CigarDiscus::eval(), shark::Ellipsoid::eval(), shark::ZDT3::eval(), shark::NegativeLogLikelihood::eval(), shark::ZDT2::eval(), shark::ZDT1::eval(), shark::ZDT6::eval(), shark::LooErrorCSvm< InputType, CacheType >::eval(), shark::ZDT4::eval(), shark::Rosenbrock::eval(), shark::LooError< ModelTypeT, LabelType >::eval(), shark::TwoNormRegularizer::eval(), shark::ExactGradient< RBMType >::evalDerivative(), shark::NegativeLogLikelihood::evalDerivative(), shark::CrossEntropy::evalDerivative(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::BipolarLayer::expectedParameterDerivative(), frobenius_prod(), shark::VDCMA::init(), shark::LMCMA::init(), shark::ConvolutionalRBM< VisibleLayerT, HiddenLayerT, RngT >::inputHidden(), main(), shark::negativeLogLikelihoodFromLogPartition(), norm_1(), norm_frobenius(), norm_sqr(), shark::InvertedGenerationalDistance::operator()(), shark::RouletteWheelSelection::operator()(), shark::Dirichlet_distribution< RealType >::operator()(), shark::LinearRankingSelection< Extractor >::operator()(), shark::Dirichlet< RngType >::p(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::setMaxIterations(), shark::ConvexCombination::setParameterVector(), soft_max(), shark::BiasSolver< Matrix >::solve(), shark::BiasSolverSimplex< Matrix >::solve(), shark::QpMcDecomp< Matrix >::solveForBias(), shark::statistics::Mean::statistics(), shark::sumOfWeights(), shark::NormalizeKernelUnitVariance< InputType >::train(), shark::McReinforcedSvmTrainer< InputType, CacheType >::train(), shark::McSvmCSTrainer< InputType, CacheType >::train(), shark::McSvmLLWTrainer< InputType, CacheType >::train(), shark::McSvmATMTrainer< InputType, CacheType >::train(), shark::McSvmWWTrainer< InputType, CacheType >::train(), shark::McSvmADMTrainer< InputType, CacheType >::train(), shark::McSvmATSTrainer< InputType, CacheType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::CSvmTrainer< InputType, CacheType >::train(), shark::SquaredHingeCSvmTrainer< InputType, CacheType >::train(), shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM(), shark::MultiNomialDistribution::update(), shark::GaussianRbfKernel< InputType >::weightedParameterDerivative(), shark::PolynomialKernel< InputType >::weightedParameterDerivative(), shark::WeightedSumKernel< InputType >::weightedParameterDerivative(), shark::CSvmDerivative< InputType, CacheType >::write(), and shark::FFNet< HiddenNeuron, OutputNeuron >::write().

§ sum_columns()

§ sum_rows()

§ swap_columns()

template<class M >
void shark::blas::swap_columns ( permutation_matrix const &  P,
matrix_expression< M > &  A 
)

implements column pivoting at matrix A using permutation P

by convention it is not allowed that P(i) < i.

Definition at line 86 of file permutation.hpp.

References shark::blas::vector< T >::size().

Referenced by shark::PrecomputedMatrix< Matrix >::flipColumnsAndRows(), swap_columns_inverted(), swap_full(), and swap_full_inverted().

§ swap_columns_inverted()

template<class M >
void shark::blas::swap_columns_inverted ( permutation_matrix const &  P,
matrix_expression< M > &  A 
)

implements the inverse column pivoting at matrix A using permutation P

This is the inverse operation to swapColumns.

Definition at line 105 of file permutation.hpp.

References shark::blas::vector< T >::size(), and swap_columns().

§ swap_full()

template<class M >
void shark::blas::swap_full ( permutation_matrix const &  P,
matrix_expression< M > &  A 
)

Implements full pivoting at matrix A using permutation P.

full pivoting does swap rows and columns such that the diagonal element A_ii is then at position A_P(i)P(i) by convention it is not allowed that P(i) < i.

Definition at line 117 of file permutation.hpp.

References shark::blas::vector< T >::size(), swap_columns(), and swap_rows().

§ swap_full_inverted()

template<class M >
void shark::blas::swap_full_inverted ( permutation_matrix const &  P,
matrix_expression< M > &  A 
)

implements the inverse full pivoting at matrix A using permutation P

This is the inverse operation to swap_full.

Definition at line 127 of file permutation.hpp.

References shark::blas::vector< T >::size(), swap_columns(), and swap_rows().

Referenced by shark::NormalizeComponentsWhitening::train().

§ swap_rows() [1/2]

template<class M >
void shark::blas::swap_rows ( permutation_matrix const &  P,
matrix_expression< M > &  A 
)

implements row pivoting at matrix A using permutation P

by convention it is not allowed that P(i) < i.

Definition at line 54 of file permutation.hpp.

References shark::blas::vector< T >::size().

Referenced by shark::PrecomputedMatrix< Matrix >::flipColumnsAndRows(), lu_factorize(), swap_full(), swap_full_inverted(), and swap_rows_inverted().

§ swap_rows() [2/2]

template<class V >
void shark::blas::swap_rows ( permutation_matrix const &  P,
vector_expression< V > &  v 
)

implements column pivoting of vector A using permutation P

by convention it is not allowed that P(i) < i.

Definition at line 63 of file permutation.hpp.

References shark::blas::vector< T >::size(), and shark::swap().

§ swap_rows_inverted() [1/2]

template<class V , class Permutation >
void shark::blas::swap_rows_inverted ( Permutation const &  P,
vector_expression< V > &  v 
)

implements the inverse row pivoting of vector v using permutation P

This is the inverse operation to swap_rows.

Definition at line 72 of file permutation.hpp.

References shark::swap(), and shark::blas::vector< std::size_t >::swap.

§ swap_rows_inverted() [2/2]

template<class M >
void shark::blas::swap_rows_inverted ( permutation_matrix const &  P,
matrix_expression< M > &  A 
)

implements the inverse row pivoting at matrix A using permutation P

This is the inverse operation to swapRows.

Definition at line 95 of file permutation.hpp.

References shark::blas::vector< T >::size(), and swap_rows().

§ symm_prod() [1/2]

template<class M , class E >
void shark::blas::symm_prod ( matrix_expression< E > const &  A,
matrix_expression< M > &  m,
bool  init = true,
typename M::value_type  alpha = 1.0 
)

computes C= alpha*AA^T or C+=alpha* AA^T

Definition at line 178 of file operation.hpp.

References axpy_prod(), SIZE_CHECK, and trans().

Referenced by symm_prod(), and shark::NormalizeComponentsWhitening::train().

§ symm_prod() [2/2]

template<class M , class E >
void shark::blas::symm_prod ( matrix_expression< E > const &  A,
temporary_proxy< M > &  m,
bool  init = 1.0,
typename M::value_type  alpha = 1.0 
)

computes C= alpha*AA^T or C+=alpha* AA^T

Definition at line 192 of file operation.hpp.

References symm_prod().

§ to_matrix() [1/3]

template<class V >
boost::enable_if< boost::is_same<typename V::storage_category,dense_tag>, temporary_proxy< dense_matrix_adaptor< typename boost::remove_reference<typename V::reference>::type > >>::type shark::blas::to_matrix ( vector_expression< V > &  v,
std::size_t  size1,
std::size_t  size2 
)

§ to_matrix() [2/3]

template<class V >
boost::enable_if< boost::is_same<typename V::storage_category,dense_tag>, temporary_proxy< dense_matrix_adaptor<typename V::value_type const> >>::type shark::blas::to_matrix ( vector_expression< V > const &  v,
std::size_t  size1,
std::size_t  size2 
)

Converts a dense vector to a matrix of a given size.

Definition at line 1635 of file matrix_proxy.hpp.

References shark::blas::matrix_reference< M >::size1(), and shark::blas::matrix_reference< M >::size2().

§ to_matrix() [3/3]

template<class E >
boost::enable_if< boost::is_same<typename E::storage_category,dense_tag>, temporary_proxy< dense_matrix_adaptor< typename boost::remove_reference<typename E::reference>::type > >>::type shark::blas::to_matrix ( temporary_proxy< E >  v,
std::size_t  size1,
std::size_t  size2 
)

Definition at line 1649 of file matrix_proxy.hpp.

References to_matrix().

§ trace()

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".

Example:

\[ \left( \begin{array}{*{4}{c}} {\bf 1} & 5 & 9 & 13\\ 2 & {\bf 6} & 10 & 14\\ 3 & 7 & {\bf 11} & 15\\ 4 & 8 & 12 & {\bf 16}\\ \end{array} \right) \longrightarrow 1 + 6 + 11 + 16 = 34 \]

Parameters
msquare matrix
Returns
the sum of the values at the diagonal of m

Definition at line 1281 of file matrix_expression.hpp.

References shark::blas::outer_product< E1, E2 >::size1(), shark::blas::outer_product< E1, E2 >::size2(), and SIZE_CHECK.

Referenced by shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::evalDerivative(), shark::exportKernelMatrix(), and shark::NormalizeKernelUnitVariance< InputType >::train().

§ trans() [1/3]

template<class M >
matrix_transpose<typename const_expression<M>::type > shark::blas::trans ( matrix_expression< M > const &  m)

Definition at line 471 of file matrix_proxy.hpp.

Referenced by applyHouseholderOnTheLeft(), axpy_prod(), createData(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::decoderMatrix(), shark::LinearKernel< InputType >::eval(), shark::MonomialKernel< InputType >::eval(), shark::ConvexCombination::eval(), shark::PolynomialKernel< InputType >::eval(), shark::LinearModel< VectorType >::eval(), shark::KernelExpansion< RealVector >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::FFNet< HiddenNeuron, OutputNeuron >::evalLayer(), shark::RBM< VisibleLayerT, HiddenLayerT, RngT >::inputHidden(), prod(), shark::RotatedObjectiveFunction::proposeStartingPoint(), shark::FFNet< HiddenNeuron, OutputNeuron >::setParameterVector(), symm_prod(), shark::NormalizeComponentsWhitening::train(), shark::NormalizeComponentsZCA::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::LassoRegression< InputVectorType >::trainInternal(), trans(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedDerivatives(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedInputDerivative(), shark::ConvexCombination::weightedParameterDerivative(), shark::LinearModel< VectorType >::weightedParameterDerivative(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedParameterDerivative(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::write(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::write(), and shark::FFNet< HiddenNeuron, OutputNeuron >::write().

§ trans() [2/3]

template<class M >
temporary_proxy< matrix_transpose<M> > shark::blas::trans ( matrix_expression< M > &  m)

Definition at line 475 of file matrix_proxy.hpp.

§ trans() [3/3]

template<class M >
temporary_proxy< matrix_transpose<M> > shark::blas::trans ( temporary_proxy< M >  m)

Definition at line 480 of file matrix_proxy.hpp.

References trans().

§ triangular_prod() [1/3]

template<class TriangularType , class MatrixA , class V >
void shark::blas::triangular_prod ( matrix_expression< MatrixA > const &  A,
vector_expression< V > &  x 
)

Computes x=Ax for a triangular matrix A.

The first template argument governs the type of triangular matrix: lower, upper, unit_lower and unit_upper.

Example: triangular_prod<lower>(A,x);

Definition at line 208 of file operation.hpp.

§ triangular_prod() [2/3]

template<class TriangularType , class MatrixA , class MatB >
void shark::blas::triangular_prod ( matrix_expression< MatrixA > const &  A,
matrix_expression< MatB > &  B 
)

Computes B=AB for a triangular matrix A and a dense matrix B in place.

The first template argument governs the type of triangular matrix: lower, upper, unit_lower and unit_upper.

Example: triangular_prod<lower>(A,B);

Definition at line 222 of file operation.hpp.

§ triangular_prod() [3/3]

template<class TriangularType , class MatrixA , class E >
void shark::blas::triangular_prod ( matrix_expression< MatrixA > const &  A,
temporary_proxy< E >  e 
)

triangular prod for temporary left-hand side arguments

Dispatches to the other versions of triangular_prod, see their documentation

Definition at line 233 of file operation.hpp.

§ triangularColumn() [1/2]

template<class Matrix >
vector_range<matrix_column<Matrix const> > shark::blas::triangularColumn ( matrix_expression< Matrix > const &  mat,
std::size_t  i 
)

Returns the elements in the i-th column of the matrix excluding the zero elements.

Definition at line 168 of file Tools.h.

References column(), and subrange().

§ triangularColumn() [2/2]

template<class Matrix >
vector_range<matrix_column<Matrix> > shark::blas::triangularColumn ( matrix_expression< Matrix > &  mat,
std::size_t  i 
)

Returns the elements in the i-th column of the matrix excluding the zero elements.

Definition at line 177 of file Tools.h.

References column(), and subrange().

§ triangularRow() [1/2]

template<class Matrix >
vector_range<matrix_row<Matrix const> > shark::blas::triangularRow ( matrix_expression< Matrix > const &  mat,
std::size_t  i 
)

Returns the ith row of an upper triangular matrix excluding the elements right of the diagonal.

Definition at line 107 of file Tools.h.

References row(), and subrange().

§ triangularRow() [2/2]

template<class Matrix >
temporary_proxy< vector_range<matrix_row<Matrix> > > shark::blas::triangularRow ( matrix_expression< Matrix > &  mat,
std::size_t  i 
)

Returns the ith row of an upper triangular matrix excluding the elements right of the diagonal.

Definition at line 117 of file Tools.h.

References row(), and subrange().

§ unitTriangularColumn() [1/2]

template<class Matrix >
vector_range<matrix_column<Matrix const> > shark::blas::unitTriangularColumn ( matrix_expression< Matrix > const &  mat,
std::size_t  i 
)

Returns the elements in the i-th column of the matrix below the diagonal.

Definition at line 148 of file Tools.h.

References column(), and subrange().

§ unitTriangularColumn() [2/2]

template<class Matrix >
temporary_proxy< vector_range<matrix_column<Matrix> > > shark::blas::unitTriangularColumn ( matrix_expression< Matrix > &  mat,
std::size_t  i 
)

Returns the elements in the i-th column of the matrix below the diagonal.

Definition at line 158 of file Tools.h.

References column(), and subrange().

§ unitTriangularRow() [1/2]

template<class Matrix >
vector_range<matrix_row<Matrix const> > shark::blas::unitTriangularRow ( matrix_expression< Matrix > const &  mat,
std::size_t  i 
)

Returns the elements in the ith row of a lower triangular matrix left of the diagonal.

Definition at line 126 of file Tools.h.

References row(), and subrange().

§ unitTriangularRow() [2/2]

template<class Matrix >
temporary_proxy< vector_range<matrix_row<Matrix> > > shark::blas::unitTriangularRow ( matrix_expression< Matrix > &  mat,
std::size_t  i 
)

Returns the elements in the ith row of a lower triangular matrix left of the diagonal.

Definition at line 136 of file Tools.h.

References row(), and subrange().