remora Namespace Reference

Assignment and evaluation of vector expressions. More...

Namespaces

 bindings
 
 detail
 
 gpu
 
 iterators
 
 kernels
 

Classes

class  Blocking
 partitions the matrix in 4 blocks defined by one splitting point (i,j). More...
 
class  cg_solver
 
class  cholesky_decomposition
 Lower triangular Cholesky decomposition. More...
 
class  compressed_matrix
 
class  compressed_vector
 Compressed array based sparse vector. More...
 
struct  conjugate_gradient
 
struct  const_expression< triangular_matrix< T, Orientation, TriangularType > >
 
struct  const_expression< triangular_matrix< T, Orientation, TriangularType > const >
 
struct  cpu_tag
 
class  dense_matrix_adaptor< T, Orientation, gpu_tag >
 
class  dense_vector_adaptor< T, gpu_tag >
 
struct  device_traits
 
struct  device_traits< cpu_tag >
 
struct  device_traits< gpu_tag >
 
struct  gpu_tag
 
class  identity_matrix
 An identity matrix with values of type T. More...
 
struct  indefinite_full_rank
 
class  matrix
 A dense matrix of values of type T. More...
 
class  matrix< T, L, cpu_tag >
 A dense matrix of values of type T. More...
 
class  matrix< T, L, gpu_tag >
 A dense matrix of values of type T stored on the gpu. More...
 
struct  matrix_container
 Base class for Matrix container models. More...
 
struct  matrix_expression
 Base class for Matrix Expression models. More...
 
class  matrix_inverse
 
class  matrix_matrix_solve
 
struct  matrix_temporary_type< T, L, dense_tag, cpu_tag >
 
struct  matrix_temporary_type< T, L, dense_tag, Tag >
 
struct  matrix_temporary_type< T, O, sparse_tag, cpu_tag >
 
struct  matrix_temporary_type< T, triangular< Orientation, TriangularType >, packed_tag, cpu_tag >
 
struct  matrix_temporary_type< T, unknown_orientation, dense_tag, cpu_tag >
 
struct  matrix_temporary_type< T, unknown_orientation, dense_tag, Tag >
 
class  matrix_transport_to_cpu
 
class  matrix_transport_to_gpu
 
class  matrix_vector_solve
 
class  noalias_proxy
 
struct  permutation_matrix
 
class  pivoting_lu_decomposition
 
struct  solver
 
struct  solver_expression
 
class  symm_eigenvalue_decomposition
 Symmetric eigenvalue decomposition A=QDQ^T. More...
 
struct  symm_pos_def
 
class  symm_pos_semi_definite_solver
 
struct  symm_semi_pos_def
 
struct  temporary_proxy
 
class  triangular_matrix
 
class  vector
 A dense vector of values of type T. More...
 
class  vector< T, cpu_tag >
 
class  vector< T, gpu_tag >
 A dense vector of values of type T sored on the GPU. More...
 
struct  vector_container
 Base class for Vector container models. More...
 
struct  vector_expression
 Base class for Vector Expression models. More...
 
struct  vector_set_expression
 Base class for expressions of vector sets. More...
 
struct  vector_temporary_type< T, dense_tag, Tag >
 
struct  vector_temporary_type< T, sparse_tag, cpu_tag >
 
class  vector_transport_to_cpu
 
class  vector_transport_to_gpu
 

Functions

template<class E , class Device >
std::conditional< std::is_base_of< blockwise_tag, typename E::evaluation_category >::value, typename vector_temporary< E >::type, E const & >::type eval_block (vector_expression< E, Device > const &e)
 conditionally evaluates a vector expression if it is a block expression More...
 
template<class E , class Device >
std::conditional< std::is_base_of< blockwise_tag, typename E::evaluation_category >::value, typename matrix_temporary< E >::type, E const & >::type eval_block (matrix_expression< E, Device > const &e)
 conditionally evaluates a matrix expression if it is a block expression More...
 
template<class E , class Device >
std::conditional< std::is_same< unknown_storage, typename E::storage_type >::value, typename vector_temporary< E >::type, E const & >::type eval_expression (vector_expression< E, Device > const &e)
 Evaluates an expression if it does not have a standard storage layout. More...
 
template<class E , class Device >
std::conditional< std::is_same< unknown_storage, typename E::storage_type >::value, typename matrix_temporary< E >::type, E const & >::type eval_expression (matrix_expression< E, Device > const &e)
 Evaluates an expression if it does not have a standard storage layout. More...
 
template<class VecX , class VecV , class Device >
VecX & assign (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v)
 Dispatches vector assignment on an expression level. More...
 
template<class VecX , class VecV , class Device >
VecX & assign (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v, typename VecX::value_type alpha)
 Dispatches vector assignment on an expression level. More...
 
template<class VecX , class VecV , class Device >
VecX & plus_assign (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v)
 Dispatches vector plus-assignment on an expression level. More...
 
template<class VecX , class VecV , class Device >
VecX & plus_assign (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v, typename VecX::value_type alpha)
 Dispatches vector plus-assignment on an expression level. More...
 
template<class VecX , class VecV , class Device >
VecX & multiply_assign (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v)
 Dispatches vector multiply-assignment on an expression level. More...
 
template<class VecX , class VecV , class Device >
VecX & divide_assign (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v)
 Dispatches vector multiply-assignment on an expression level. More...
 
template<class MatA , class MatB , class Device >
MatA & assign (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B)
 Dispatches matrix assignment on an expression level. More...
 
template<class MatA , class MatB , class Device >
MatA & assign (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B, typename MatA::value_type alpha)
 Dispatches matrix assignment on an expression level. More...
 
template<class MatA , class MatB , class Device >
MatA & plus_assign (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B)
 Dispatches matrix plus-assignment on an expression level. More...
 
template<class MatA , class MatB , class Device >
MatA & plus_assign (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B, typename MatA::value_type alpha)
 Dispatches matrix plus-assignment on an expression level. More...
 
template<class MatA , class MatB , class Device >
MatA & multiply_assign (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B)
 Dispatches matrix multiply-assignment on an expression level. More...
 
template<class MatA , class MatB , class Device >
MatA & divide_assign (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B)
 Dispatches matrix divide-assignment on an expression level. More...
 
template<class VecX , class VecV , class Device >
VecX & operator+= (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v)
 Add-Assigns two vector expressions. More...
 
template<class VecX , class VecV , class Device >
VecX & operator-= (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v)
 Subtract-Assigns two vector expressions. More...
 
template<class VecX , class VecV , class Device >
VecX & operator*= (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v)
 Multiply-Assigns two vector expressions. More...
 
template<class VecX , class VecV , class Device >
VecX & operator/= (vector_expression< VecX, Device > &x, vector_expression< VecV, Device > const &v)
 Divide-Assigns two vector expressions. More...
 
template<class VecX , class T , class Device >
std::enable_if< std::is_convertible< T, typename VecX::value_type >::value, VecX & >::type operator+= (vector_expression< VecX, Device > &x, T t)
 Adds a scalar to all elements of the vector. More...
 
template<class VecX , class T , class Device >
std::enable_if< std::is_convertible< T, typename VecX::value_type >::value, VecX & >::type operator-= (vector_expression< VecX, Device > &x, T t)
 Subtracts a scalar from all elements of the vector. More...
 
template<class VecX , class T , class Device >
std::enable_if< std::is_convertible< T, typename VecX::value_type >::value, VecX & >::type operator*= (vector_expression< VecX, Device > &x, T t)
 Multiplies a scalar with all elements of the vector. More...
 
template<class VecX , class T , class Device >
std::enable_if< std::is_convertible< T, typename VecX::value_type >::value, VecX & >::type operator/= (vector_expression< VecX, Device > &x, T t)
 Divides all elements of the vector by a scalar. More...
 
template<class MatA , class MatB , class Device >
MatA & operator+= (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B)
 Add-Assigns two matrix expressions. More...
 
template<class MatA , class MatB , class Device >
MatA & operator-= (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B)
 Subtract-Assigns two matrix expressions. More...
 
template<class MatA , class MatB , class Device >
MatA & operator*= (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B)
 Multiply-Assigns two matrix expressions. More...
 
template<class MatA , class MatB , class Device >
MatA & operator/= (matrix_expression< MatA, Device > &A, matrix_expression< MatB, Device > const &B)
 Divide-Assigns two matrix expressions. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, MatA & >::type operator+= (matrix_expression< MatA, Device > &A, T t)
 Adds a scalar to all elements of the matrix. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, MatA & >::type operator-= (matrix_expression< MatA, Device > &A, T t)
 Subtracts a scalar from all elements of the matrix. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, MatA & >::type operator*= (matrix_expression< MatA, Device > &A, T t)
 Multiplies a scalar to all elements of the matrix. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, MatA & >::type operator/= (matrix_expression< MatA, Device > &A, T 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 , class Device >
noalias_proxy< C > noalias (matrix_expression< C, Device > &lvalue)
 
template<class C , class Device >
noalias_proxy< C > noalias (vector_expression< C, Device > &lvalue)
 
template<class C , class Device >
noalias_proxy< C > noalias (vector_set_expression< C > &lvalue)
 
template<class C >
noalias_proxy< C > noalias (temporary_proxy< C > lvalue)
 
template<class E >
vector_transport_to_cpu< E > copy_to_cpu (vector_expression< E, gpu_tag > const &e)
 
template<class E >
matrix_transport_to_cpu< E > copy_to_cpu (matrix_expression< E, gpu_tag > const &e)
 
template<class E >
vector_transport_to_gpu< E > copy_to_gpu (vector_expression< E, cpu_tag > const &e, boost::compute::command_queue &queue=boost::compute::system::default_queue())
 
template<class E >
matrix_transport_to_gpu< E > copy_to_gpu (matrix_expression< E, cpu_tag > const &e, boost::compute::command_queue &queue=boost::compute::system::default_queue())
 
template<class E >
E const & copy_to_gpu (vector_expression< E, gpu_tag > const &e, boost::compute::command_queue &queue=boost::compute::system::default_queue())
 
template<class E >
E const & copy_to_gpu (matrix_expression< E, gpu_tag > const &e, boost::compute::command_queue &queue=boost::compute::system::default_queue())
 
template<class E , class T , class VE >
std::basic_ostream< E, T > & operator<< (std::basic_ostream< E, T > &os, const vector_expression< VE, cpu_tag > &vec)
 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, cpu_tag > &mat)
 output stream operator for matrix expressions More...
 
template<class VecA , class VecB , class Device >
outer_product< VecA, VecB > outer_prod (vector_expression< VecA, Device > const &v1, vector_expression< VecB, Device > const &v2)
 Computes the outer product of two vectors. More...
 
template<class VecV , class Device >
vector_repeater< VecV > repeat (vector_expression< VecV, Device > 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 >
std::enable_if< std::is_arithmetic< T >::value, scalar_matrix< T, cpu_tag > >::type repeat (T scalar, std::size_t rows, std::size_t columns)
 Repeats a single element to form a matrix of size rows x columns. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_scalar_multiply< MatA > >::type operator* (matrix_expression< MatA, Device > const &A, T scalar)
 Computes the multiplication of a matrix-expression A with a scalar t. More...
 
template<class T , class MatA , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_scalar_multiply< MatA > >::type operator* (T scalar, matrix_expression< MatA, Device > const &A)
 Computes the multiplication of a matrix-expression A with a scalar t. More...
 
template<class MatA , class Device >
matrix_scalar_multiply< MatA > operator- (matrix_expression< MatA, Device > const &A)
 Negates the matrix-expression A. More...
 
template<class MatA , class MatB , class Device >
matrix_addition< MatA, MatB > operator+ (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B)
 Adds two Matrices. More...
 
template<class MatA , class MatB , class Device >
matrix_addition< MatA, matrix_scalar_multiply< MatB > > operator- (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B)
 Subtracts two Matrices. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_addition< MatA, scalar_matrix< T, Device > >>::type operator+ (matrix_expression< MatA, Device > const &A, T t)
 Adds a matrix plus a scalar which is interpreted as a constant matrix. More...
 
template<class T , class MatA , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_addition< MatA, scalar_matrix< T, Device > >>::type operator+ (T t, matrix_expression< MatA, Device > const &A)
 Adds a matrix plus a scalar which is interpreted as a constant matrix. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_addition< MatA, matrix_scalar_multiply< scalar_matrix< T, Device > > >>::type operator- (matrix_expression< MatA, Device > const &A, T t)
 Subtracts a scalar which is interpreted as a constant matrix from a matrix. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_addition< scalar_matrix< T, Device >, matrix_scalar_multiply< MatA > >>::type operator- (T t, matrix_expression< MatA, Device > const &A)
 Subtracts a matrix from a scalar which is interpreted as a constant matrix. More...
 
template<class MatA , class MatB , class Device >
matrix_binary< MatA, MatB, typename device_traits< Device >::template safe_divide< typename common_value_type< MatA, MatB >::type > > safe_div (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B, typename common_value_type< MatA, MatB >::type defaultValue)
 
template<class MatA , class VecV , class Device >
detail::matrix_vector_prod_optimizer< MatA, VecV >::type prod (matrix_expression< MatA, Device > const &A, vector_expression< VecV, Device > const &v)
 computes the matrix-vector product x+=Av More...
 
template<class MatA , class VecV , class Device >
auto prod (vector_expression< VecV, Device > const &v, matrix_expression< MatA, Device > const &A) -> decltype(prod(trans(A), v))
 computes the matrix-vector product x+=v^TA More...
 
template<class MatA , class VecV , class Device >
auto operator% (vector_expression< VecV, Device > const &v, matrix_expression< MatA, Device > const &A) -> decltype(prod(trans(A), v))
 Operator syntax for computes the matrix-vector product. More...
 
template<class MatA , class VecV , class Device >
auto operator% (matrix_expression< MatA, Device > const &A, vector_expression< VecV, Device > const &v) -> decltype(prod(A, v))
 Operator syntax for computes the matrix-vector product. More...
 
template<class TriangularType , class MatA , class VecV , class Device >
matrix_vector_prod< detail::dense_triangular_proxy< typename const_expression< MatA >::type, TriangularType >,VecV > triangular_prod (matrix_expression< MatA, Device > const &A, vector_expression< VecV, Device > &v)
 Computes the matrix-vector product x+= alpha * Av or x= alpha * Av. More...
 
template<class MatA , class MatB , class Device >
detail::matrix_matrix_prod_optimizer< MatA, MatB >::type prod (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B)
 computes the matrix-matrix product X+=AB More...
 
template<class MatA , class MatB , class Device >
auto operator% (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B) -> decltype(prod(A, B))
 Operator syntax for computes the matrix-matrix product. More...
 
template<class TriangularType , class MatA , class MatB , class Device >
matrix_matrix_prod< detail::dense_triangular_proxy< typename const_expression< MatA >::type, TriangularType >,MatB > triangular_prod (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B)
 Computes the matrix-vector product x+= alpha * AB or x= alpha * AB. More...
 
template<class MatA , class Device >
sum_matrix_rows< MatA > sum_rows (matrix_expression< MatA, Device > const &A)
 
template<class MatA , class Device >
auto sum_columns (matrix_expression< MatA, Device > const &A) -> decltype(sum_rows(trans(A)))
 
template<class MatA , class Device >
MatA::value_type sum (matrix_expression< MatA, Device > const &A)
 
template<class MatA , class Device >
MatA::value_type max (matrix_expression< MatA, Device > const &A)
 
template<class MatA , class Device >
MatA::value_type min (matrix_expression< MatA, Device > const &A)
 
template<class MatA , class MatB , class Device >
decltype(typename MatA::value_type() *typename MatB::value_type()) frobenius_prod (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B)
 Returns the frobenius inner-product between matrices exprssions 1 and B. More...
 
template<class MatA , class Device >
real_traits< typename MatA::value_type >::type norm_1 (matrix_expression< MatA, Device > const &A)
 Computes the matrix 1-norm |A|_1. More...
 
template<class MatA , class Device >
real_traits< typename MatA::value_type >::type norm_frobenius (matrix_expression< MatA, Device > const &A)
 computes the frobenius norm |A|_F More...
 
template<class MatA , class Device >
real_traits< typename MatA::value_type >::type norm_inf (matrix_expression< MatA, Device > const &A)
 Computes the matrix inf-norm |A|_inf. More...
 
template<class MatA , class Device >
MatA::value_type trace (matrix_expression< MatA, Device > const &A)
 Evaluates the trace of matrix A. More...
 
template<class MatA , class Device >
diagonal_matrix< MatA > to_diagonal (vector_expression< MatA, Device > const &A)
 
template<class MatA , class MatB , class Device >
matrix_concat< MatA, MatB, true > operator| (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B)
 Forms the block matrix (A|B) where B is to the right of A. More...
 
template<class MatA , class VecV , class Device >
auto operator| (matrix_expression< MatA, Device > const &A, vector_expression< VecV, Device > const &v) -> decltype(A|trans(repeat(v, 1)))
 Forms the block matrix (A|v) where v is a column vector to the right of A. More...
 
template<class MatA , class VecV , class Device >
auto operator| (vector_expression< VecV, Device > const &v, matrix_expression< MatA, Device > const &A) -> decltype(trans(repeat(v, 1))|A)
 Forms the block matrix (v|A) where v is a column vector to the left of A. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_concat< MatA, scalar_matrix< T, Device >, true > >::type operator| (matrix_expression< MatA, Device > const &A, T const &t)
 Forms the block matrix (A|t) More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_concat< scalar_matrix< T, Device >, MatA, true > >::type operator| (T const &t, matrix_expression< MatA, Device > const &A)
 Forms the block matrix (t|A) More...
 
template<class MatA , class MatB , class Device >
matrix_concat< MatA, MatB, false > operator & (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B)
 Forms the block matrix A&B where A is on top of B. More...
 
template<class MatA , class VecV , class Device >
auto operator & (matrix_expression< MatA, Device > const &A, vector_expression< VecV, Device > const &v) -> decltype(A &repeat(v, 1))
 Forms the block matrix (A & v) where v is a row vector on the bottom of A. More...
 
template<class MatA , class VecV , class Device >
auto operator & (vector_expression< VecV, Device > const &v, matrix_expression< MatA, Device > const &A) -> decltype(repeat(v, 1) &A)
 Forms the block matrix (A & v) where v is a row vector on the top of A. More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_concat< MatA, scalar_matrix< T, Device >, false > >::type operator & (matrix_expression< MatA, Device > const &A, T const &t)
 Forms the block matrix (A & t) More...
 
template<class MatA , class T , class Device >
std::enable_if< std::is_convertible< T, typename MatA::value_type >::value, matrix_concat< scalar_matrix< T, Device >, MatA, false > >::type operator & (T const &t, matrix_expression< MatA, Device > const &A)
 Forms the block matrix (t & A) More...
 
template<class E >
E const & copy_to_cpu (matrix_expression< E, cpu_tag > const &e)
 
template<class M , class Device >
temporary_proxy< typename detail::matrix_transpose_optimizer< M >::type > trans (matrix_expression< M, Device > &m)
 Returns a proxy which transposes the matrix. More...
 
template<class M , class Device >
detail::matrix_transpose_optimizer< typename const_expression< M >::type >::type trans (matrix_expression< M, Device > const &m)
 
template<class M >
temporary_proxy< typename detail::matrix_transpose_optimizer< M >::type > trans (temporary_proxy< M > m)
 
template<class M , class Device >
temporary_proxy< typename detail::matrix_row_optimizer< M >::type > row (matrix_expression< M, Device > &expression, typename M::size_type i)
 Returns a vector-proxy representing the i-th row of the Matrix. More...
 
template<class M , class Device >
detail::matrix_row_optimizer< typename const_expression< M >::type >::type row (matrix_expression< M, Device > const &expression, typename M::size_type i)
 
template<class M >
temporary_proxy< typename detail::matrix_row_optimizer< M >::type > row (temporary_proxy< M > expression, typename M::size_type i)
 
template<class M , class Device >
auto column (matrix_expression< M, Device > &expression, typename M::size_type j) -> decltype(row(trans(expression), j))
 Returns a vector-proxy representing the j-th column of the Matrix. More...
 
template<class M , class Device >
auto column (matrix_expression< M, Device > const &expression, typename M::size_type j) -> decltype(row(trans(expression), j))
 
template<class M , class Device >
auto column (temporary_proxy< M > expression, typename M::size_type j) -> decltype(row(trans(expression), j))
 
template<class M , class Device >
matrix_vector_range< typename const_expression< M >::type > diag (matrix_expression< M, Device > const &mat)
 Returns the diagonal of a constant square matrix as vector. More...
 
template<class M , class Device >
temporary_proxy< matrix_vector_range< M > > diag (matrix_expression< M, Device > &mat)
 
template<class M >
temporary_proxy< matrix_vector_range< M > > diag (temporary_proxy< M > mat)
 
template<class M , class Device >
temporary_proxy< typename detail::matrix_range_optimizer< M >::type > subrange (matrix_expression< M, Device > &expression, std::size_t start1, std::size_t stop1, std::size_t start2, std::size_t stop2)
 Returns a submatrix of a given matrix. More...
 
template<class M , class Device >
detail::matrix_range_optimizer< typename const_expression< M >::type >::type subrange (matrix_expression< M, Device > const &expression, std::size_t start1, std::size_t stop1, std::size_t start2, std::size_t stop2)
 
template<class M , class Device >
auto subrange (temporary_proxy< M > expression, std::size_t start1, std::size_t stop1, std::size_t start2, std::size_t stop2) -> decltype(subrange(static_cast< M &>(expression), start1, stop1, start2, stop2))
 
template<class M , class Device >
auto rows (matrix_expression< M, Device > &expression, std::size_t start, std::size_t stop) -> decltype(subrange(expression, start, stop, 0, expression().size2()))
 
template<class M , class Device >
auto rows (matrix_expression< M, Device > const &expression, std::size_t start, std::size_t stop) -> decltype(subrange(expression, start, stop, 0, expression().size2()))
 
template<class M >
auto rows (temporary_proxy< M > expression, std::size_t start, std::size_t stop) -> decltype(rows(static_cast< M &>(expression), start, stop))
 
template<class M , class Device >
auto columns (matrix_expression< M, Device > &expression, typename M::size_type start, typename M::size_type stop) -> decltype(subrange(expression, 0, expression().size1(), start, stop))
 
template<class M , class Device >
auto columns (matrix_expression< M, Device > const &expression, typename M::size_type start, typename M::size_type stop) -> decltype(subrange(expression, 0, expression().size1(), start, stop))
 
template<class M >
auto columns (temporary_proxy< M > expression, std::size_t start, std::size_t stop) -> decltype(columns(static_cast< M &>(expression), start, 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 , class Tag >
std::enable_if< std::is_same< typename V::storage_type::storage_tag, dense_tag >::value, temporary_proxy< dense_matrix_adaptor< typename std::remove_reference< typename V::reference >::type, row_major, Tag > >>::type to_matrix (vector_expression< V, Tag > &v, std::size_t size1, std::size_t size2)
 Converts a dense vector to a matrix of a given size. More...
 
template<class V , class Tag >
std::enable_if< std::is_same< typename V::storage_type::storage_tag, dense_tag >::value, temporary_proxy< dense_matrix_adaptor< typename V::value_type const, row_major, Tag > >>::type to_matrix (vector_expression< V, Tag > 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 >
auto to_matrix (temporary_proxy< E > e, std::size_t size1, std::size_t size2) -> decltype(to_matrix(static_cast< E &>(e), size1, size2))
 
template<class E , class Device >
std::enable_if< std::is_same< typename E::evaluation_category::tag, dense_tag >::value, temporary_proxy< linearized_matrix< typename const_expression< E >::type > >>::type to_vector (matrix_expression< E, Device > const &e)
 Converts a dense matrix to a vector. More...
 
template<class E , class Device >
std::enable_if< std::is_same< typename E::evaluation_category::tag, dense_tag >::value, temporary_proxy< linearized_matrix< E > >>::type to_vector (matrix_expression< E, Device > &e)
 
template<class E >
auto to_vector (temporary_proxy< E > e) -> decltype(to_vector(static_cast< E &>(e)))
 
template<class VecP , class M >
void swap_rows (vector_expression< VecP, cpu_tag > const &P, matrix_expression< M, cpu_tag > &A)
 implements row pivoting at matrix A using permutation P More...
 
template<class VecP , class V >
void swap_rows (vector_expression< VecP, cpu_tag > const &P, vector_expression< V, cpu_tag > &v)
 implements column pivoting of vector A using permutation P More...
 
template<class VecP , class V >
void swap_rows_inverted (vector_expression< VecP, cpu_tag > const &P, vector_expression< V, cpu_tag > &v)
 implements the inverse row pivoting of vector v using permutation P More...
 
template<class VecP , class M >
void swap_columns (vector_expression< VecP, cpu_tag > const &P, matrix_expression< M, cpu_tag > &A)
 implements column pivoting at matrix A using permutation P More...
 
template<class VecP , class M >
void swap_rows_inverted (vector_expression< VecP, cpu_tag > const &P, matrix_expression< M, cpu_tag > &A)
 implements the inverse row pivoting at matrix A using permutation P More...
 
template<class VecP , class M >
void swap_columns_inverted (vector_expression< VecP, cpu_tag > const &P, matrix_expression< M, cpu_tag > &A)
 implements the inverse column pivoting at matrix A using permutation P More...
 
template<class VecP , class M >
void swap_full (vector_expression< VecP, cpu_tag > const &P, matrix_expression< M, cpu_tag > &A)
 Implements full pivoting at matrix A using permutation P. More...
 
template<class VecP , class M >
void swap_full_inverted (vector_expression< VecP, cpu_tag > const &P, matrix_expression< M, cpu_tag > &A)
 implements the inverse full pivoting at matrix A using permutation P More...
 
template<class MatA , class VecB , bool Left, class Device , class SystemType >
detail::matrix_vector_solve_optimizer< MatA, VecB, SystemType, system_tag< Left > >::type solve (matrix_expression< MatA, Device > const &A, vector_expression< VecB, Device > const &b, SystemType t, system_tag< Left >)
 
template<class MatA , class MatB , bool Left, class Device , class SystemType >
detail::matrix_matrix_solve_optimizer< MatA, MatB, SystemType, system_tag< Left > >::type solve (matrix_expression< MatA, Device > const &A, matrix_expression< MatB, Device > const &B, SystemType t, system_tag< Left >)
 
template<class MatA , class Device , class SystemType >
detail::matrix_inverse_optimizer< MatA, SystemType >::type inv (matrix_expression< MatA, Device > const &A, SystemType t)
 
template<class T , class VecV , class Device >
std::enable_if< std::is_convertible< T, typename VecV::value_type >::value, vector_scalar_multiply< VecV >>::type operator* (vector_expression< VecV, Device > const &v, T scalar)
 
template<class T , class VecV , class Device >
std::enable_if< std::is_convertible< T, typename VecV::value_type >::value, vector_scalar_multiply< VecV >>::type operator* (T scalar, vector_expression< VecV, Device > const &v)
 
template<class VecV , class Device >
vector_scalar_multiply< VecV > operator- (vector_expression< VecV, Device > const &v)
 
template<class T >
std::enable_if< std::is_arithmetic< T >::value, scalar_vector< T, cpu_tag > >::type repeat (T scalar, std::size_t elements)
 Creates a vector having a constant value. More...
 
template<class VecV1 , class VecV2 , class Device >
vector_addition< VecV1, VecV2 > operator+ (vector_expression< VecV1, Device > const &v1, vector_expression< VecV2, Device > const &v2)
 Adds two vectors. More...
 
template<class VecV1 , class VecV2 , class Device >
vector_addition< VecV1, vector_scalar_multiply< VecV2 > > operator- (vector_expression< VecV1, Device > const &v1, vector_expression< VecV2, Device > const &v2)
 Subtracts two vectors. More...
 
template<class VecV , class T , class Device >
std::enable_if< std::is_convertible< T, typename VecV::value_type >::value, vector_addition< VecV, scalar_vector< T, Device > >>::type operator+ (vector_expression< VecV, Device > const &v, T t)
 Adds a vector plus a scalar which is interpreted as a constant vector. More...
 
template<class T , class VecV , class Device >
std::enable_if< std::is_convertible< T, typename VecV::value_type >::value, vector_addition< VecV, scalar_vector< T, Device > >>::type operator+ (T t, vector_expression< VecV, Device > const &v)
 Adds a vector plus a scalar which is interpreted as a constant vector. More...
 
template<class VecV , class T , class Device >
std::enable_if< std::is_convertible< T, typename VecV::value_type >::value, vector_addition< VecV, vector_scalar_multiply< scalar_vector< T, Device > > >>::type operator- (vector_expression< VecV, Device > const &v, T t)
 Subtracts a scalar which is interpreted as a constant vector. More...
 
template<class VecV , class T , class Device >
std::enable_if< std::is_convertible< T, typename VecV::value_type >::value, vector_addition< scalar_vector< T, Device >, vector_scalar_multiply< VecV > >>::type operator- (T t, vector_expression< VecV, Device > const &v)
 Subtracts a vector from a scalar which is interpreted as a constant vector. More...
 
template<class VecV1 , class VecV2 , class Device >
vector_binary< VecV1, VecV2, typename device_traits< Device >::template safe_divide< typename common_value_type< VecV1, VecV2 >::type > > safe_div (vector_expression< VecV1, Device > const &v1, vector_expression< VecV2, Device > const &v2, typename common_value_type< VecV1, VecV2 >::type defaultValue)
 
template<class VecV , class Device >
VecV::value_type sum (vector_expression< VecV, Device > const &v)
 sum v = sum_i v_i More...
 
template<class VecV , class Device >
VecV::value_type max (vector_expression< VecV, Device > const &v)
 max v = max_i v_i More...
 
template<class VecV , class Device >
VecV::value_type min (vector_expression< VecV, Device > const &v)
 min v = min_i v_i More...
 
template<class VecV , class Device >
std::size_t arg_max (vector_expression< VecV, Device > const &v)
 arg_max v = arg max_i v_i More...
 
template<class VecV , class Device >
std::size_t arg_min (vector_expression< VecV, Device > const &v)
 arg_min v = arg min_i v_i More...
 
template<class VecV , class Device >
VecV::value_type soft_max (vector_expression< VecV, Device > const &v)
 soft_max v = ln(sum(exp(v))) More...
 
template<class VecV , class Device >
real_traits< typename VecV::value_type >::type norm_1 (vector_expression< VecV, Device > const &v)
 norm_1 v = sum_i |v_i| More...
 
template<class VecV , class Device >
real_traits< typename VecV::value_type >::type norm_sqr (vector_expression< VecV, Device > const &v)
 norm_2 v = sum_i |v_i|^2 More...
 
template<class VecV , class Device >
real_traits< typename VecV::value_type >::type norm_2 (vector_expression< VecV, Device > const &v)
 norm_2 v = sqrt (sum_i |v_i|^2 ) More...
 
template<class VecV , class Device >
real_traits< typename VecV::value_type >::type norm_inf (vector_expression< VecV, Device > const &v)
 norm_inf v = max_i |v_i| More...
 
template<class VecV , class Device >
std::size_t index_norm_inf (vector_expression< VecV, Device > const &v)
 index_norm_inf v = arg max_i |v_i| More...
 
template<class VecV1 , class VecV2 , class Device >
decltype(typename VecV1::value_type() *typename VecV2::value_type()) inner_prod (vector_expression< VecV1, Device > const &v1, vector_expression< VecV2, Device > const &v2)
 
template<class VecV1 , class VecV2 , class Device >
vector_concat< VecV1, VecV2 > operator| (vector_expression< VecV1, Device > const &v1, vector_expression< VecV2, Device > const &v2)
 Concatenates two vectors. More...
 
template<class VecV , class T , class Device >
std::enable_if< std::is_convertible< T, typename VecV::value_type >::value, vector_concat< VecV, scalar_vector< T, Device > >>::type operator| (vector_expression< VecV, Device > const &v, T t)
 Concatenates a vector with a scalar. More...
 
template<class T , class VecV , class Device >
std::enable_if< std::is_convertible< T, typename VecV::value_type >::value, vector_concat< scalar_vector< T, Device >, VecV >>::type operator| (T t, vector_expression< VecV, Device > const &v)
 Concatenates a vector with a scalar. More...
 
template<class E >
E const & copy_to_cpu (vector_expression< E, cpu_tag > const &e)
 
template<class V , class Device >
temporary_proxy< typename detail::vector_range_optimizer< V >::type > subrange (vector_expression< V, Device > &expression, std::size_t start, std::size_t stop)
 Return a subrange of a specified vector, forming a vector for the specified indices between start and stop index. More...
 
template<class V , class Device >
detail::vector_range_optimizer< typename const_expression< V >::type >::type subrange (vector_expression< V, Device > const &expression, std::size_t start, std::size_t stop)
 
template<class V >
temporary_proxy< typename detail::vector_range_optimizer< V >::type > subrange (temporary_proxy< V > expression, std::size_t start, std::size_t stop)
 
template<class T >
temporary_proxy< dense_vector_adaptor< T > > adapt_vector (std::size_t size, T *expression)
 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 , class Device >
VectorT::value_type diagonalMahalanobisNormSqr (vector_expression< VectorT, Device > const &vector, vector_expression< WeightT, Device > const &weights)
 Normalized squared norm_2 (diagonal Mahalanobis). More...
 
template<class VectorT , class WeightT , class Device >
VectorT::value_type diagonalMahalanobisNorm (vector_expression< VectorT, Device > const &vector, vector_expression< WeightT, Device > const &weights)
 Normalized norm_2 (diagonal Mahalanobis). More...
 
template<class VectorT , class VectorU , class WeightT , class Device >
VectorT::value_type diagonalMahalanobisDistanceSqr (vector_expression< VectorT, Device > const &op1, vector_expression< VectorU, Device > const &op2, vector_expression< WeightT, Device > const &weights)
 Normalized Euclidian squared distance (squared diagonal Mahalanobis) between two vectors. More...
 
template<class VectorT , class VectorU , class Device >
VectorT::value_type distanceSqr (vector_expression< VectorT, Device > const &op1, vector_expression< VectorU, Device > const &op2)
 Squared distance between two vectors. More...
 
template<class MatrixT , class VectorU , class VectorR , class Device >
void distanceSqr (matrix_expression< MatrixT, Device > const &operands, vector_expression< VectorU, Device > const &op2, vector_expression< VectorR, Device > &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 , class Device >
vector< typename MatrixT::value_type > distanceSqr (matrix_expression< MatrixT, Device > const &operands, vector_expression< VectorU, Device > const &op2)
 Squared distance between a vector and a set of vectors. More...
 
template<class MatrixT , class VectorU , class Device >
vector< typename MatrixT::value_type > distanceSqr (vector_expression< VectorU, Device > const &op1, matrix_expression< MatrixT, Device > const &operands)
 Squared distance between a vector and a set of vectors. More...
 
template<class MatrixT , class MatrixU , class Device >
matrix< typename MatrixT::value_type > distanceSqr (matrix_expression< MatrixT, Device > const &X, matrix_expression< MatrixU, Device > const &Y)
 Squared distance between the vectors of two sets of vectors. More...
 
template<class VectorT , class VectorU , class Device >
VectorT::value_type distance (vector_expression< VectorT, Device > const &op1, vector_expression< VectorU, Device > const &op2)
 Calculates distance between two vectors. More...
 
template<class VectorT , class VectorU , class WeightT , class Device >
VectorT::value_type diagonalMahalanobisDistance (vector_expression< VectorT, Device > const &op1, vector_expression< VectorU, Device > const &op2, vector_expression< WeightT, Device > const &weights)
 Normalized euclidian distance (diagonal Mahalanobis) between two vectors. More...
 

Detailed Description

Assignment and evaluation of vector expressions.

Helper functions for linear algebra component.

Helper functions to calculate several norms and distances.

Sparse vector class.

Vector proxy classes.

expression templates for vector valued math

Implements the Dense vector class.

Implements a matrix with triangular storage layout.

Defines types for matrix decompositions.

Permutations of vectors and matrices.

Sparse matrix class.

Matrix proxy expressions.

Expression templates for expressions involving matrices.

Kernel for calculating the maximum element of a vector.

Triangular solve kernel for vector expressions.

Triangular solve kernel for matrix epressions.

Triangular matrix-vector multiplication kernel.

Triangular Matrix-Matrix multiplication kernel.

Triangular packed matrix-vector multiplication.

matrix-matrix multiplication kernel for symmetrik Rank-K updates

Symmetric eigenvalue decomposition.

Dispatches the POTRF algorithm.

Algorithm to reduce a vector to a scalar value.

kernels for folding kernels with openCL

kernels for folding matrices with openCL

Kernels for matrix-expression assignments on the gpu.

Dispatches the GETRF algorithm.

matrix-vector multiplication kernel

matrix-matrix multiplication kernel

dot-product of vectors

Kernels for folding vector expressions.

Assignment kernels for vector expressions.

Implements the triangular packed matrix-vector multiplication.

Contains the lapack bindings for the symmetric eigenvalue problem syev.

Sums the rows of a row-major or column major matrix.

Low level proxy generating functions.

Cholesky Decompositions for a positive semi-definite Matrix A = LL^T.

Implements the default implementation of the POTRF algorithm.

The mgemm macro kernel used for implementing gemm.

Kernels for folding matrix expressions.

Kernels for matrix-expression assignments.

Implements the default implementation of the getrf algorithm.

dense matrix matrix multiplication implementation

Implements the 2D convolution kernel for cpus.

2d convolution kernel

cblas binding for dense gemm

  • Input and output of vectors and matrices.

Implements the dense vector class for the gpu.

Traits of gpu expressions.

Implements the dense matrix class for the gpu.

Implements operations to copy data from cpu to gpu and back.

Defines the basic types of CRTP base-classes.

Defines types for matrix decompositions and solvers.

Implements the dense vector class for the cpu.

Traits of matrix expressions.

Dense Matrix class.

Iterators for elementwise vector expression evaluation.

Author
O. Krause
Date
2013
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2016
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2011
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
-
Date
-
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2010
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2011
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.solves systems of triangular matrices

Author
O. Krause
Date
2017
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2012
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2012
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MatAERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2016
Copyright 1995-2014 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2015
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2016
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.solves systems of triangular matrices

Author
O. Krause
Date
2016
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.solves systems of triangular matrices with one left hand side

Author
O. Krause
Date
2012
Copyright 1995-2014 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2012
Copyright 1995-2014 Shark Developcbment Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O. Krause
Date
2014
Copyright 1995-2015 Shark Development Team



This file is part of Shark. http://image.diku.dk/shark/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O.Krause M.Thuma
Date
2010-2011
Copyright 1995-2017 Shark Development Team



This file is part of Shark. http://shark-ml.org/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Author
O.Krause M.Thuma
Date
20102011
Copyright 1995-2017 Shark Development Team



This file is part of Shark. http://shark-ml.org/

Shark is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Shark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with Shark. If not, see http://www.gnu.org/licenses/.

Function Documentation

◆ adapt_matrix() [1/2]

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

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

Definition at line 271 of file matrix_proxy.hpp.

◆ adapt_matrix() [2/2]

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

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

Definition at line 277 of file matrix_proxy.hpp.

◆ adapt_vector() [1/2]

template<class T >
temporary_proxy<dense_vector_adaptor<T> > remora::adapt_vector ( std::size_t  size,
T *  expression 
)

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

Definition at line 72 of file vector_proxy.hpp.

Referenced by shark::exportFiltersToPGMGrid(), and shark::BaseDCNonDominatedSort::operator()().

◆ adapt_vector() [2/2]

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

Converts a C-style array into a vector.

Definition at line 78 of file vector_proxy.hpp.

◆ arg_max()

template<class VecV , class Device >
std::size_t remora::arg_max ( vector_expression< VecV, Device > const &  v)

◆ arg_min()

template<class VecV , class Device >
std::size_t remora::arg_min ( vector_expression< VecV, Device > const &  v)

arg_min v = arg min_i v_i

Definition at line 292 of file vector_expression.hpp.

References arg_max().

Referenced by shark::kMeans().

◆ assign() [1/4]

◆ assign() [2/4]

template<class VecX , class VecV , class Device >
VecX& remora::assign ( vector_expression< VecX, Device > &  x,
vector_expression< VecV, Device > const &  v,
typename VecX::value_type  alpha 
)

Dispatches vector assignment on an expression level.

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

Definition at line 180 of file assignment.hpp.

References remora::detail::assign().

◆ assign() [3/4]

template<class MatA , class MatB , class Device >
MatA& remora::assign ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > 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 283 of file assignment.hpp.

References remora::detail::assign().

◆ assign() [4/4]

template<class MatA , class MatB , class Device >
MatA& remora::assign ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > const &  B,
typename MatA::value_type  alpha 
)

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 295 of file assignment.hpp.

References remora::detail::assign().

◆ column() [1/3]

template<class M , class Device >
auto remora::column ( matrix_expression< M, Device > &  expression,
typename M::size_type  j 
) -> decltype(row(trans(expression),j))

Returns a vector-proxy representing the j-th column of the Matrix.

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

the column(A,1) operation results in column(A,1) = (2,5,8)

Definition at line 114 of file matrix_proxy.hpp.

References row(), and trans().

Referenced by shark::RFClassifier< LabelType >::computeFeatureImportances(), remora::detail::distanceSqrBlockBlockRowWise(), shark::NegativeAUC< LabelType, OutputType >::eval(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::LooErrorCSvm< InputType, CacheType >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::eval(), shark::NegativeWilcoxonMannWhitneyStatistic< LabelType, OutputType >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::CSvmTrainer< InputType, CacheType >::get_db_dParams(), shark::getColumn(), shark::EnergyStoringTemperedMarkovChain< Operator >::getDownDifferences(), shark::EnergyStoringTemperedMarkovChain< Operator >::getUpDifferences(), remora::bindings::matrix_assign(), remora::bindings::matrix_assign_functor(), shark::ReferenceVectorGuidedSelection< shark::Individual >::minCol(), shark::LinearSAGTrainer< InputType, LabelType >::numberOfParameters(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::setMaxIterations(), remora::cg_solver< MatA >::solve(), shark::KernelMeanClassifier< InputType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::LassoRegression< InputVectorType >::train(), shark::RankingSvmTrainer< InputType, CacheType >::train(), shark::SquaredHingeCSvmTrainer< InputType, CacheType >::train(), shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM(), remora::cholesky_decomposition< remora::matrix< double, blas::column_major > >::update(), and shark::CSvmDerivative< InputType, CacheType >::write().

◆ column() [2/3]

template<class M , class Device >
auto remora::column ( matrix_expression< M, Device > const &  expression,
typename M::size_type  j 
) -> decltype(row(trans(expression),j))

Definition at line 118 of file matrix_proxy.hpp.

References row(), and trans().

◆ column() [3/3]

template<class M , class Device >
auto remora::column ( temporary_proxy< M >  expression,
typename M::size_type  j 
) -> decltype(row(trans(expression),j))

Definition at line 123 of file matrix_proxy.hpp.

References row(), and trans().

◆ columns() [1/3]

template<class M , class Device >
auto remora::columns ( matrix_expression< M, Device > &  expression,
typename M::size_type  start,
typename M::size_type  stop 
) -> decltype(subrange(expression, 0,expression().size1(), start, stop))

◆ columns() [2/3]

template<class M , class Device >
auto remora::columns ( matrix_expression< M, Device > const &  expression,
typename M::size_type  start,
typename M::size_type  stop 
) -> decltype(subrange(expression, 0,expression().size1(), start, stop))

Definition at line 248 of file matrix_proxy.hpp.

References subrange().

◆ columns() [3/3]

template<class M >
auto remora::columns ( temporary_proxy< M >  expression,
std::size_t  start,
std::size_t  stop 
) -> decltype(columns(static_cast<M&>(expression),start,stop))

Definition at line 258 of file matrix_proxy.hpp.

References columns().

◆ copy_to_cpu() [1/4]

template<class E >
E const& remora::copy_to_cpu ( vector_expression< E, cpu_tag > const &  e)

Definition at line 412 of file vector_expression.hpp.

◆ copy_to_cpu() [2/4]

template<class E >
vector_transport_to_cpu<E> remora::copy_to_cpu ( vector_expression< E, gpu_tag > const &  e)

Definition at line 516 of file copy.hpp.

◆ copy_to_cpu() [3/4]

template<class E >
matrix_transport_to_cpu<E> remora::copy_to_cpu ( matrix_expression< E, gpu_tag > const &  e)

Definition at line 521 of file copy.hpp.

◆ copy_to_cpu() [4/4]

template<class E >
E const& remora::copy_to_cpu ( matrix_expression< E, cpu_tag > const &  e)

Definition at line 626 of file matrix_expression.hpp.

◆ copy_to_gpu() [1/4]

template<class E >
vector_transport_to_gpu<E> remora::copy_to_gpu ( vector_expression< E, cpu_tag > const &  e,
boost::compute::command_queue &  queue = boost::compute::system::default_queue() 
)

Definition at line 525 of file copy.hpp.

References remora::vector_transport_to_cpu< E >::queue().

◆ copy_to_gpu() [2/4]

template<class E >
matrix_transport_to_gpu<E> remora::copy_to_gpu ( matrix_expression< E, cpu_tag > const &  e,
boost::compute::command_queue &  queue = boost::compute::system::default_queue() 
)

Definition at line 533 of file copy.hpp.

References remora::vector_transport_to_cpu< E >::queue().

◆ copy_to_gpu() [3/4]

template<class E >
E const& remora::copy_to_gpu ( vector_expression< E, gpu_tag > const &  e,
boost::compute::command_queue &  queue = boost::compute::system::default_queue() 
)

Definition at line 543 of file copy.hpp.

◆ copy_to_gpu() [4/4]

template<class E >
E const& remora::copy_to_gpu ( matrix_expression< E, gpu_tag > const &  e,
boost::compute::command_queue &  queue = boost::compute::system::default_queue() 
)

Definition at line 551 of file copy.hpp.

◆ diag() [1/3]

template<class M , class Device >
matrix_vector_range<typename const_expression<M>::type > remora::diag ( matrix_expression< M, Device > 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 141 of file matrix_proxy.hpp.

Referenced by diag(), shark::CMSA::eigenValues(), shark::CrossEntropy::evalDerivative(), shark::NormalDistributedPoints::NormalDistributedPoints(), shark::blas::randomRotationMatrix(), trace(), shark::RegularizationNetworkTrainer< InputType >::train(), and shark::LassoRegression< InputVectorType >::train().

◆ diag() [2/3]

template<class M , class Device >
temporary_proxy< matrix_vector_range<M> > remora::diag ( matrix_expression< M, Device > &  mat)

Definition at line 148 of file matrix_proxy.hpp.

◆ diag() [3/3]

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

Definition at line 155 of file matrix_proxy.hpp.

References diag().

◆ diagonalMahalanobisNorm()

template<class VectorT , class WeightT , class Device >
VectorT::value_type remora::diagonalMahalanobisNorm ( vector_expression< VectorT, Device > const &  vector,
vector_expression< WeightT, Device > 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 diagonalMahalanobisNormSqr(), and SIZE_CHECK.

◆ diagonalMahalanobisNormSqr()

template<class VectorT , class WeightT , class Device >
VectorT::value_type remora::diagonalMahalanobisNormSqr ( vector_expression< VectorT, Device > const &  vector,
vector_expression< WeightT, Device > 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(), SIZE_CHECK, and shark::sqr().

Referenced by diagonalMahalanobisNorm().

◆ divide_assign() [1/2]

template<class VecX , class VecV , class Device >
VecX& remora::divide_assign ( vector_expression< VecX, Device > &  x,
vector_expression< VecV, Device > 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 225 of file assignment.hpp.

References eval_block().

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

◆ divide_assign() [2/2]

template<class MatA , class MatB , class Device >
MatA& remora::divide_assign ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > 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 344 of file assignment.hpp.

References eval_block().

◆ eval_block() [1/2]

template<class E , class Device >
std::conditional< std::is_base_of< blockwise_tag, typename E::evaluation_category >::value, typename vector_temporary<E>::type, E const&>::type remora::eval_block ( vector_expression< E, Device > 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 61 of file assignment.hpp.

Referenced by arg_max(), divide_assign(), frobenius_prod(), index_norm_inf(), inner_prod(), max(), min(), multiply_assign(), norm_1(), norm_frobenius(), norm_inf(), norm_sqr(), operator<<(), remora::symm_pos_semi_definite_solver< MatrixStorage >::solve(), and sum().

◆ eval_block() [2/2]

template<class E , class Device >
std::conditional< std::is_base_of< blockwise_tag, typename E::evaluation_category >::value, typename matrix_temporary<E>::type, E const&>::type remora::eval_block ( matrix_expression< E, Device > 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 78 of file assignment.hpp.

◆ eval_expression() [1/2]

template<class E , class Device >
std::conditional< std::is_same< unknown_storage, typename E::storage_type >::value, typename vector_temporary<E>::type, E const&>::type remora::eval_expression ( vector_expression< E, Device > const &  e)

Evaluates an expression if it does not have a standard storage layout.

This function evaluates an expression to a temporary if it does not have a known storage type. i.e. proxy expressions and containers are not evaluated but passed through while everything else is evaluated.

Definition at line 97 of file assignment.hpp.

Referenced by remora::kernels::gemm(), remora::kernels::gemv(), remora::kernels::syrk(), remora::kernels::trmm(), remora::kernels::trmv(), remora::kernels::trsm_impl(), and remora::kernels::trsv().

◆ eval_expression() [2/2]

template<class E , class Device >
std::conditional< std::is_same< unknown_storage, typename E::storage_type >::value, typename matrix_temporary<E>::type, E const&>::type remora::eval_expression ( matrix_expression< E, Device > const &  e)

Evaluates an expression if it does not have a standard storage layout.

This function evaluates an expression to a temporary if it does not have a known storage type. i.e. proxy expressions and containers are not evaluated but passed through while everything else is evaluated.

Definition at line 114 of file assignment.hpp.

◆ frobenius_prod()

template<class MatA , class MatB , class Device >
decltype(typename MatA::value_type() * typename MatB::value_type()) remora::frobenius_prod ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B 
)

Returns the frobenius inner-product between matrices exprssions 1 and B.

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 441 of file matrix_expression.hpp.

References eval_block(), and sum().

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

◆ index_norm_inf()

template<class VecV , class Device >
std::size_t remora::index_norm_inf ( vector_expression< VecV, Device > const &  v)

index_norm_inf v = arg max_i |v_i|

Definition at line 346 of file vector_expression.hpp.

References arg_max(), and eval_block().

◆ inner_prod()

template<class VecV1 , class VecV2 , class Device >
decltype( typename VecV1::value_type() * typename VecV2::value_type() ) remora::inner_prod ( vector_expression< VecV1, Device > const &  v1,
vector_expression< VecV2, Device > const &  v2 
)

◆ inv()

template<class MatA , class Device , class SystemType >
detail::matrix_inverse_optimizer<MatA, SystemType>::type remora::inv ( matrix_expression< MatA, Device > const &  A,
SystemType  t 
)

Definition at line 489 of file solve.hpp.

Referenced by shark::RegularizationNetworkTrainer< InputType >::train().

◆ max() [1/2]

template<class VecV , class Device >
VecV::value_type remora::max ( vector_expression< VecV, Device > const &  v)

max v = max_i v_i

Definition at line 261 of file vector_expression.hpp.

References eval_block().

Referenced by min().

◆ max() [2/2]

template<class MatA , class Device >
MatA::value_type remora::max ( matrix_expression< MatA, Device > const &  A)

Definition at line 416 of file matrix_expression.hpp.

References eval_block().

Referenced by benchmark(), remora::iterators::binary_transform_iterator< Iterator1, Iterator2, F >::binary_transform_iterator(), shark::binarySubProblem(), shark::QpMcLinearCS< InputT >::calcGradient(), shark::QpMcLinearADM< InputT >::calcGradient(), shark::QpMcLinearATM< InputT >::calcGradient(), shark::QpMcBoxDecomp< Matrix >::checkKKT(), shark::BoxConstrainedProblem< Problem >::checkKKT(), shark::QpMcSimplexDecomp< Matrix >::checkKKT(), shark::SvmProblem< Problem >::checkKKT(), shark::BoxConstraintHandler< SearchPointType >::closestFeasible(), shark::CMA::condition(), shark::NestedGridSearch::configure(), remora::bindings::conv2d(), 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::EpsilonHingeLoss::evalDerivative(), shark::SquaredEpsilonHingeLoss::evalDerivative(), shark::HingeLoss::evalDerivative(), shark::SquaredHingeLoss::evalDerivative(), shark::NegativeLogLikelihood::evalDerivative(), shark::CrossEntropy::evalDerivative(), shark::exportFiltersToPGMGrid(), shark::BoxBasedShrinkingStrategy< BoxConstrainedProblem< Problem > >::flipCoordinates(), shark::CSvmTrainer< InputType, CacheType >::get_db_dParams(), shark::SimpleNearestNeighbors< InputType, LabelType >::getNeighbors(), shark::importCSV(), shark::VDCMA::init(), shark::NSGA3Indicator::init(), shark::JaakkolaHeuristic::JaakkolaHeuristic(), shark::kMeans(), shark::VDCMA::lambda(), shark::HypervolumeContributionMD::largest(), shark::HypervolumeContribution3D::largest(), shark::CrowdingDistance::leastContributor(), shark::AdditiveEpsilonIndicator::leastContributor(), shark::NSGA3Indicator::leastContributors(), 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_1(), norm_inf(), shark::LabelOrder::normalizeLabels(), shark::numberOfClasses(), shark::LinearSAGTrainer< InputType, LabelType >::numberOfParameters(), shark::TwoStateSpace< State1, State2 >::numberOfStates(), shark::ReferenceVectorAdaptation< shark::Individual >::operator()(), shark::HypervolumeCalculatorMDWFG::operator()(), shark::SimulatedBinaryCrossover< RealVector >::operator()(), shark::IndicatorBasedSelection< NSGA3Indicator >::operator()(), shark::MultiVariateNormalDistribution::operator()(), shark::BaseDCNonDominatedSort::operator()(), remora::device_traits< cpu_tag >::max< T >::operator()(), shark::Truncate::operator()(), shark::TruncateAndRescale::operator()(), remora::bindings::pstrf(), shark::TrainingError< PointType >::reset(), shark::GeneralizationLoss< PointType >::reset(), shark::GeneralizationQuotient< PointType >::reset(), shark::HMGSelectionCriterion::reset(), shark::safeExp(), shark::QpMcSimplexDecomp< Matrix >::selectWorkingSet(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::setMaxIterations(), shark::QpMcBoxDecomp< Matrix >::shrink(), shark::HypervolumeContributionMD::smallest(), shark::HypervolumeContributionApproximator::smallest(), shark::HypervolumeContribution3D::smallest(), soft_max(), shark::QpMcLinear< InputT >::solve(), shark::QpBoxLinear< InputT >::solve(), remora::cg_solver< MatA >::solve(), shark::BiasSolver< Matrix >::solve(), shark::BiasSolverSimplex< Matrix >::solve(), shark::tchebycheffScalarizer(), shark::BoxConstrainedProblem< Problem >::testShrinkVariable(), shark::NormalizeComponentsUnitInterval< DataType >::train(), shark::RegularizationNetworkTrainer< InputType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::RFTrainer< unsigned int >::train(), shark::LassoRegression< InputVectorType >::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::train(), shark::RFTrainer< RealVector >::train(), shark::LinearCSvmTrainer< InputType >::train(), shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM(), and shark::SvmProblem< Problem >::updateSMO().

◆ min() [1/2]

template<class VecV , class Device >
VecV::value_type remora::min ( vector_expression< VecV, Device > const &  v)

min v = min_i v_i

Definition at line 273 of file vector_expression.hpp.

References eval_block(), and max().

◆ min() [2/2]

template<class MatA , class Device >
MatA::value_type remora::min ( matrix_expression< MatA, Device > const &  A)

Definition at line 426 of file matrix_expression.hpp.

References eval_block().

Referenced by shark::SvmProblem< Problem >::applyStep(), shark::GridSearch::assignExponentialRange(), benchmark(), remora::iterators::binary_transform_iterator< Iterator1, Iterator2, F >::binary_transform_iterator(), shark::binarySubProblem(), shark::SvmProblem< Problem >::checkKKT(), shark::LRUCache< QpFloatType >::clear(), shark::BoxConstraintHandler< SearchPointType >::closestFeasible(), shark::CMA::condition(), shark::GridSearch::configure(), shark::NestedGridSearch::configure(), remora::bindings::conv2d(), remora::bindings::dense_gemm(), shark::LooErrorCSvm< InputType, CacheType >::eval(), shark::NegativeLogLikelihood::evalDerivative(), shark::SingleChainApproximator< MarkovChainType >::evalDerivative(), shark::exportFiltersToPGMGrid(), shark::BoxBasedShrinkingStrategy< BoxConstrainedProblem< Problem > >::flipCoordinates(), shark::CSvmTrainer< InputType, CacheType >::get_db_dParams(), shark::ExactGradient< RBMType >::getLogPartition(), shark::SimpleNearestNeighbors< InputType, LabelType >::getNeighbors(), shark::VDCMA::init(), shark::NSGA3Indicator::init(), shark::PointSearch::init(), shark::JaakkolaHeuristic::JaakkolaHeuristic(), shark::VDCMA::lambda(), shark::AdditiveEpsilonIndicator::leastContributor(), shark::NSGA3Indicator::leastContributors(), main(), remora::bindings::matrix_assign(), remora::bindings::matrix_assign_functor(), remora::bindings::mgemm(), shark::ReferenceVectorGuidedSelection< shark::Individual >::minCol(), shark::HypervolumeCalculatorMDHOY::operator()(), shark::ReferenceVectorAdaptation< shark::Individual >::operator()(), shark::UniformCrossover::operator()(), shark::SimulatedBinaryCrossover< RealVector >::operator()(), shark::ReferenceVectorGuidedSelection< shark::Individual >::operator()(), shark::HypervolumeApproximator::operator()(), shark::LibSVMSelectionCriterion::operator()(), shark::BaseDCNonDominatedSort::operator()(), remora::device_traits< cpu_tag >::min< T >::operator()(), shark::Truncate::operator()(), shark::TruncateAndRescale::operator()(), remora::bindings::pack_image(), remora::bindings::pstrf(), shark::IterativeNNQuery< DataContainer >::queuesize(), shark::MergeBudgetMaintenanceStrategy< RealVector >::reduceBudget(), remora::compressed_vector< T, I >::reserve(), remora::compressed_matrix< T, I >::reserve_row(), shark::HMGSelectionCriterion::reset(), shark::MultiChainApproximator< MarkovChainType >::setData(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::setMaxIterations(), shark::AbstractSvmTrainer< InputType, unsigned int, KernelExpansion< InputType > >::setRegularizationParameters(), shark::QpMcLinear< InputT >::solve(), shark::QpBoxLinear< InputT >::solve(), shark::TrainingProgress< PointType >::stop(), shark::GeneralizationLoss< PointType >::stop(), shark::GeneralizationQuotient< PointType >::stop(), shark::LMCMA::suggestLambda(), remora::bindings::syrk_impl(), shark::BoxConstrainedProblem< Problem >::testShrinkVariable(), shark::KernelMeanClassifier< InputType >::train(), shark::NormalizeComponentsUnitInterval< DataType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::LassoRegression< InputVectorType >::train(), shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM(), remora::bindings::trmm_impl(), remora::bindings::trmv_impl(), remora::bindings::trsm_block(), shark::MultiNomialDistribution::update(), shark::ReferenceVectorAdaptation< shark::Individual >::updateAngles(), and shark::SvmProblem< Problem >::updateSMO().

◆ multiply_assign() [1/2]

template<class VecX , class VecV , class Device >
VecX& remora::multiply_assign ( vector_expression< VecX, Device > &  x,
vector_expression< VecV, Device > 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 213 of file assignment.hpp.

References eval_block().

Referenced by operator*=(), and remora::noalias_proxy< C >::operator*=().

◆ multiply_assign() [2/2]

template<class MatA , class MatB , class Device >
MatA& remora::multiply_assign ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > 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 331 of file assignment.hpp.

References eval_block().

◆ noalias() [1/4]

template<class C , class Device >
noalias_proxy<C> remora::noalias ( matrix_expression< C, Device > &  lvalue)

Definition at line 644 of file assignment.hpp.

Referenced by shark::QpMcLinear< InputT >::add_scaled(), shark::ProjectBudgetMaintenanceStrategy< RealVector >::addToModel(), shark::blas::applyHouseholderOnTheLeft(), shark::blas::applyHouseholderOnTheRight(), benchmark(), shark::calculateMixedKernelMatrix(), shark::calculateRegularizedKernelMatrix(), remora::symm_pos_semi_definite_solver< MatrixStorage >::compute_inverse_factor(), shark::RFClassifier< LabelType >::computeFeatureImportances(), remora::bindings::conv2d(), shark::RFClassifier< LabelType >::countAttributes(), shark::blas::createHouseholderReflection(), remora::cholesky_decomposition< remora::matrix< double, blas::column_major > >::decompose(), remora::symm_eigenvalue_decomposition< RealMatrix >::decompose(), remora::bindings::dense_gemm(), remora::detail::distanceSqrBlockBlock(), shark::NormalDistributedPoints::draw(), shark::GaussianLayer::energyTerm(), shark::BinaryLayer::energyTerm(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::LinearKernel< InputType >::eval(), shark::MonomialKernel< InputType >::eval(), shark::NormalizedKernel< InputType >::eval(), shark::NearestNeighborRegression< InputType >::eval(), shark::ConvexCombination::eval(), shark::ProductKernel< MultiTaskSample< InputTypeT > >::eval(), shark::GaussianRbfKernel< InputType >::eval(), shark::PolynomialKernel< InputType >::eval(), shark::LinearModel< VectorType >::eval(), shark::Normalizer< DataType >::eval(), shark::KernelExpansion< InputType >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::SquaredEpsilonHingeLoss::evalDerivative(), shark::Sphere::evalDerivative(), shark::HuberLoss::evalDerivative(), shark::SquaredLoss< OutputType, LabelType >::evalDerivative(), shark::Cigar::evalDerivative(), shark::Discus::evalDerivative(), shark::ExactGradient< RBMType >::evalDerivative(), shark::TukeyBiweightLoss::evalDerivative(), shark::NegativeLogLikelihood::evalDerivative(), shark::SparseAutoencoderError::evalDerivative(), shark::SingleChainApproximator< MarkovChainType >::evalDerivative(), shark::ContrastiveDivergence< Operator >::evalDerivative(), shark::CrossEntropy::evalDerivative(), shark::SquaredLoss< OutputType, unsigned int >::evalDerivative(), shark::MultiChainApproximator< MarkovChainType >::evalDerivative(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::evalDerivative(), shark::MultiObjectiveBenchmark< Objectives >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::FFNet< HiddenNeuron, OutputNeuron >::evalLayer(), shark::GaussianLayer::expectedParameterDerivative(), shark::BipolarLayer::expectedParameterDerivative(), shark::BinaryLayer::expectedParameterDerivative(), shark::exportFiltersToPGMGrid(), shark::AbstractKernelFunction< MultiTaskSample< InputTypeT > >::featureDistanceSqr(), shark::MultiVariateNormalDistributionCholesky::generate(), shark::EnergyStoringTemperedMarkovChain< Operator >::getDownDifferences(), shark::EnergyStoringTemperedMarkovChain< Operator >::getUpDifferences(), shark::NSGA3Indicator::init(), shark::MarkovChain< Operator >::initializeChain(), shark::TemperedMarkovChain< Operator >::initializeChain(), shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::inputHidden(), shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::inputVisible(), shark::kMeans(), shark::VDCMA::lambda(), shark::LMCMA::lambda(), shark::HypervolumeContributionMD::largest(), shark::NSGA3Indicator::leastContributors(), shark::CSvmDerivative< InputType, CacheType >::modelCSvmParameterDerivative(), shark::CMAIndividual< double >::mutate(), shark::LinearSAGTrainer< InputType, LabelType >::numberOfParameters(), shark::HypervolumeCalculatorMDHOY::operator()(), shark::HypervolumeCalculatorMDWFG::operator()(), remora::bindings::pack_filter(), remora::bindings::pack_image(), shark::GaussianLayer::parameterDerivative(), shark::BipolarLayer::parameterDerivative(), shark::BinaryLayer::parameterDerivative(), shark::OneVersusOneClassifier< InputType >::parameterVector(), shark::ProductKernel< MultiTaskSample< InputTypeT > >::parameterVector(), shark::OneClassSvmTrainer< InputType, CacheType >::parameterVector(), shark::FFNet< HiddenNeuron, OutputNeuron >::parameterVector(), shark::BoxBasedShrinkingStrategy< BoxConstrainedProblem< Problem > >::setInitialSolution(), shark::BoxConstrainedProblem< Problem >::setInitialSolution(), shark::SvmProblem< Problem >::setInitialSolution(), shark::FFNet< HiddenNeuron, OutputNeuron >::setLayer(), shark::ARDKernelUnconstrained< InputType >::setParameterVector(), shark::ConvexCombination::setParameterVector(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::LinearModel< VectorType >::setParameterVector(), shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::setParameterVector(), shark::Normalizer< DataType >::setParameterVector(), shark::KernelExpansion< InputType >::setParameterVector(), shark::FFNet< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::AbstractSvmTrainer< InputType, unsigned int, KernelExpansion< InputType > >::setParameterVector(), shark::HypervolumeContributionMD::smallest(), shark::HypervolumeContributionApproximator::smallest(), shark::Pegasos< VectorType >::solve(), shark::QpBoxLinear< InputT >::solve(), shark::McPegasos< VectorType >::solve(), remora::symm_pos_semi_definite_solver< MatrixStorage >::solve(), remora::cg_solver< MatA >::solve(), shark::KernelExpansion< InputType >::sparsify(), shark::Adam::step(), shark::EnergyStoringTemperedMarkovChain< Operator >::step(), shark::BipolarLayer::sufficientStatistics(), shark::GaussianLayer::sufficientStatistics(), shark::BinaryLayer::sufficientStatistics(), shark::TruncatedExponentialLayer::sufficientStatistics(), shark::KernelMeanClassifier< InputType >::train(), shark::RegularizationNetworkTrainer< InputType >::train(), shark::LassoRegression< InputVectorType >::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::LogisticRegression< InputVectorType >::train(), shark::LinearCSvmTrainer< InputType >::train(), remora::bindings::trmv_impl(), remora::cholesky_decomposition< remora::matrix< double, blas::column_major > >::update(), shark::CMAChromosome::updateAsOffspring(), shark::IndicatorBasedMOCMA< Indicator >::updatePopulation(), shark::IndicatorBasedRealCodedNSGAII< NSGA3Indicator >::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::PointSetKernel< InputType >::weightedParameterDerivative(), shark::ConvexCombination::weightedParameterDerivative(), shark::NormalizedKernel< InputType >::weightedParameterDerivative(), shark::LinearModel< VectorType >::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/4]

template<class C , class Device >
noalias_proxy<C> remora::noalias ( vector_expression< C, Device > &  lvalue)

Definition at line 648 of file assignment.hpp.

◆ noalias() [3/4]

template<class C , class Device >
noalias_proxy<C> remora::noalias ( vector_set_expression< C > &  lvalue)

Definition at line 653 of file assignment.hpp.

◆ noalias() [4/4]

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

Definition at line 657 of file assignment.hpp.

◆ norm_1() [1/2]

template<class VecV , class Device >
real_traits<typename VecV::value_type >::type remora::norm_1 ( vector_expression< VecV, Device > const &  v)

norm_1 v = sum_i |v_i|

Definition at line 318 of file vector_expression.hpp.

References eval_block(), and sum().

◆ norm_1() [2/2]

template<class MatA , class Device >
real_traits<typename MatA::value_type>::type remora::norm_1 ( matrix_expression< MatA, Device > const &  A)

Computes the matrix 1-norm |A|_1.

It is defined as \( \max_i \sum_j |A_{ij}| \)

Definition at line 455 of file matrix_expression.hpp.

References max(), and sum_rows().

Referenced by shark::OneNormRegularizer::eval(), and shark::KernelExpansion< InputType >::sparsify().

◆ norm_2()

◆ norm_frobenius()

template<class MatA , class Device >
real_traits<typename MatA::value_type>::type remora::norm_frobenius ( matrix_expression< MatA, Device > const &  A)

computes the frobenius norm |A|_F

It is defined as \( \sqrt{Tr(A^TA)}=\sqrt{\sum_{ij} A_{ij}^2} \)

Definition at line 464 of file matrix_expression.hpp.

References eval_block(), shark::sqr(), and sum().

◆ norm_inf() [1/2]

template<class VecV , class Device >
real_traits<typename VecV::value_type >::type remora::norm_inf ( vector_expression< VecV, Device > const &  v)

norm_inf v = max_i |v_i|

Definition at line 340 of file vector_expression.hpp.

References eval_block(), and max().

◆ norm_inf() [2/2]

template<class MatA , class Device >
real_traits<typename MatA::value_type>::type remora::norm_inf ( matrix_expression< MatA, Device > const &  A)

Computes the matrix inf-norm |A|_inf.

It is defined as \( \max_i \sum_j |A_{ij}| \)

Definition at line 474 of file matrix_expression.hpp.

References max(), and sum_columns().

Referenced by shark::IHR1::init(), shark::IHR3::init(), shark::IHR4::init(), shark::IHR2::init(), shark::IHR6::init(), remora::cg_solver< MatA >::solve(), and shark::LogisticRegression< InputVectorType >::train().

◆ norm_sqr()

◆ operator &() [1/5]

template<class MatA , class MatB , class Device >
matrix_concat<MatA, MatB, false> remora::operator& ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B 
)

Forms the block matrix A&B where A is on top of B.

Definition at line 570 of file matrix_expression.hpp.

◆ operator &() [2/5]

template<class MatA , class VecV , class Device >
auto remora::operator& ( matrix_expression< MatA, Device > const &  A,
vector_expression< VecV, Device > const &  v 
) -> decltype(A & repeat(v,1))

Forms the block matrix (A & v) where v is a row vector on the bottom of A.

Definition at line 579 of file matrix_expression.hpp.

References repeat().

◆ operator &() [3/5]

template<class MatA , class VecV , class Device >
auto remora::operator& ( vector_expression< VecV, Device > const &  v,
matrix_expression< MatA, Device > const &  A 
) -> decltype(repeat(v,1) & A)

Forms the block matrix (A & v) where v is a row vector on the top of A.

Definition at line 588 of file matrix_expression.hpp.

References repeat().

◆ operator &() [4/5]

template<class MatA , class T , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type>::value, matrix_concat<MatA, scalar_matrix<T, Device>, false > >::type remora::operator& ( matrix_expression< MatA, Device > const &  A,
T const &  t 
)

Forms the block matrix (A & t)

The scalar t is interpreted as row vector

Definition at line 602 of file matrix_expression.hpp.

References repeat().

◆ operator &() [5/5]

template<class MatA , class T , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type>::value, matrix_concat<scalar_matrix<T, Device>, MatA, false > >::type remora::operator& ( T const &  t,
matrix_expression< MatA, Device > const &  A 
)

Forms the block matrix (t & A)

The scalar t is interpreted as row vector

Definition at line 616 of file matrix_expression.hpp.

References repeat().

◆ operator%() [1/3]

template<class MatA , class VecV , class Device >
auto remora::operator% ( vector_expression< VecV, Device > const &  v,
matrix_expression< MatA, Device > const &  A 
) -> decltype(prod(trans(A),v))

Operator syntax for computes the matrix-vector product.

vA= prod(v,A).

Definition at line 316 of file matrix_expression.hpp.

References prod(), and trans().

◆ operator%() [2/3]

template<class MatA , class VecV , class Device >
auto remora::operator% ( matrix_expression< MatA, Device > const &  A,
vector_expression< VecV, Device > const &  v 
) -> decltype(prod(A,v))

Operator syntax for computes the matrix-vector product.

Av = prod(A,v).

Definition at line 325 of file matrix_expression.hpp.

References prod().

◆ operator%() [3/3]

template<class MatA , class MatB , class Device >
auto remora::operator% ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B 
) -> decltype(prod(A,B))

Operator syntax for computes the matrix-matrix product.

AB= prod(A,B).

Definition at line 364 of file matrix_expression.hpp.

References prod().

◆ operator*() [1/4]

template<class T , class VecV , class Device >
std::enable_if< std::is_convertible<T, typename VecV::value_type >::value, vector_scalar_multiply<VecV>>::type remora::operator* ( vector_expression< VecV, Device > const &  v,
scalar 
)

Definition at line 43 of file vector_expression.hpp.

◆ operator*() [2/4]

template<class T , class VecV , class Device >
std::enable_if< std::is_convertible<T, typename VecV::value_type >::value, vector_scalar_multiply<VecV>>::type remora::operator* ( scalar,
vector_expression< VecV, Device > const &  v 
)

Definition at line 52 of file vector_expression.hpp.

◆ operator*() [3/4]

template<class MatA , class T , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type >::value, matrix_scalar_multiply<MatA> >::type remora::operator* ( matrix_expression< MatA, Device > const &  A,
scalar 
)

Computes the multiplication of a matrix-expression A with a scalar t.

\( (A*t)_{ij} = e_{ij}*t \)

Definition at line 90 of file matrix_expression.hpp.

◆ operator*() [4/4]

template<class T , class MatA , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type >::value, matrix_scalar_multiply<MatA> >::type remora::operator* ( scalar,
matrix_expression< MatA, Device > const &  A 
)

Computes the multiplication of a matrix-expression A with a scalar t.

\( (t*A)_{ij} = t*e_{ij} \)

Definition at line 102 of file matrix_expression.hpp.

◆ operator*=() [1/5]

template<class VecX , class VecV , class Device >
VecX& remora::operator*= ( vector_expression< VecX, Device > &  x,
vector_expression< VecV, Device > 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 389 of file assignment.hpp.

References multiply_assign().

◆ operator*=() [2/5]

template<class VecX , class T , class Device >
std::enable_if<std::is_convertible<T, typename VecX::value_type>::value,VecX&>::type remora::operator*= ( vector_expression< VecX, Device > &  x,
t 
)

Multiplies a scalar with all elements of the vector.

Performs the operation x_i *= t for all elements.

Definition at line 433 of file assignment.hpp.

◆ operator*=() [3/5]

template<class MatA , class MatB , class Device >
MatA& remora::operator*= ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > 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 489 of file assignment.hpp.

References multiply_assign().

◆ operator*=() [4/5]

template<class MatA , class T , class Device >
std::enable_if<std::is_convertible<T, typename MatA::value_type>::value,MatA&>::type remora::operator*= ( matrix_expression< MatA, Device > &  A,
t 
)

Multiplies a scalar to all elements of the matrix.

Performs the operation A_ij *= t for all elements.

Definition at line 535 of file assignment.hpp.

◆ operator*=() [5/5]

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

Definition at line 567 of file assignment.hpp.

◆ operator+() [1/6]

template<class VecV1 , class VecV2 , class Device >
vector_addition<VecV1, VecV2 > remora::operator+ ( vector_expression< VecV1, Device > const &  v1,
vector_expression< VecV2, Device > const &  v2 
)

Adds two vectors.

Definition at line 103 of file vector_expression.hpp.

◆ operator+() [2/6]

template<class VecV , class T , class Device >
std::enable_if< std::is_convertible<T, typename VecV::value_type>::value, vector_addition<VecV, scalar_vector<T, Device> >>::type remora::operator+ ( vector_expression< VecV, Device > const &  v,
t 
)

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

Definition at line 125 of file vector_expression.hpp.

◆ operator+() [3/6]

template<class T , class VecV , class Device >
std::enable_if< std::is_convertible<T, typename VecV::value_type>::value, vector_addition<VecV, scalar_vector<T, Device> >>::type remora::operator+ ( t,
vector_expression< VecV, Device > const &  v 
)

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

Definition at line 137 of file vector_expression.hpp.

◆ operator+() [4/6]

template<class MatA , class MatB , class Device >
matrix_addition<MatA, MatB > remora::operator+ ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B 
)

Adds two Matrices.

Definition at line 143 of file matrix_expression.hpp.

◆ operator+() [5/6]

template<class MatA , class T , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type>::value, matrix_addition<MatA, scalar_matrix<T,Device> >>::type remora::operator+ ( matrix_expression< MatA, Device > const &  A,
t 
)

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

Definition at line 168 of file matrix_expression.hpp.

◆ operator+() [6/6]

template<class T , class MatA , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type>::value, matrix_addition<MatA, scalar_matrix<T,Device> >>::type remora::operator+ ( t,
matrix_expression< MatA, Device > const &  A 
)

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

Definition at line 180 of file matrix_expression.hpp.

◆ operator+=() [1/5]

template<class VecX , class VecV , class Device >
VecX& remora::operator+= ( vector_expression< VecX, Device > &  x,
vector_expression< VecV, Device > 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 363 of file assignment.hpp.

References remora::detail::plus_assign().

◆ operator+=() [2/5]

template<class VecX , class T , class Device >
std::enable_if<std::is_convertible<T, typename VecX::value_type>::value,VecX&>::type remora::operator+= ( vector_expression< VecX, Device > &  x,
t 
)

Adds a scalar to all elements of the vector.

Performs the operation x_i += t for all elements.

Definition at line 413 of file assignment.hpp.

◆ operator+=() [3/5]

template<class MatA , class MatB , class Device >
MatA& remora::operator+= ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > 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 461 of file assignment.hpp.

References remora::detail::plus_assign().

◆ operator+=() [4/5]

template<class MatA , class T , class Device >
std::enable_if<std::is_convertible<T, typename MatA::value_type>::value,MatA&>::type remora::operator+= ( matrix_expression< MatA, Device > &  A,
t 
)

Adds a scalar to all elements of the matrix.

Performs the operation A_ij += t for all elements.

Definition at line 515 of file assignment.hpp.

◆ operator+=() [5/5]

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

Definition at line 557 of file assignment.hpp.

◆ operator-() [1/8]

template<class VecV , class Device >
vector_scalar_multiply<VecV> remora::operator- ( vector_expression< VecV, Device > const &  v)

Definition at line 58 of file vector_expression.hpp.

◆ operator-() [2/8]

template<class MatA , class Device >
matrix_scalar_multiply<MatA> remora::operator- ( matrix_expression< MatA, Device > const &  A)

Negates the matrix-expression A.

\( (-A)_{ij} = - e_{ij} \)

Definition at line 110 of file matrix_expression.hpp.

◆ operator-() [3/8]

template<class VecV1 , class VecV2 , class Device >
vector_addition<VecV1, vector_scalar_multiply<VecV2> > remora::operator- ( vector_expression< VecV1, Device > const &  v1,
vector_expression< VecV2, Device > const &  v2 
)

Subtracts two vectors.

Definition at line 112 of file vector_expression.hpp.

◆ operator-() [4/8]

template<class VecV , class T , class Device >
std::enable_if< std::is_convertible<T, typename VecV::value_type>::value , vector_addition<VecV, vector_scalar_multiply<scalar_vector<T, Device> > >>::type remora::operator- ( vector_expression< VecV, Device > const &  v,
t 
)

Subtracts a scalar which is interpreted as a constant vector.

Definition at line 149 of file vector_expression.hpp.

◆ operator-() [5/8]

template<class MatA , class MatB , class Device >
matrix_addition<MatA, matrix_scalar_multiply<MatB> > remora::operator- ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B 
)

Subtracts two Matrices.

Definition at line 154 of file matrix_expression.hpp.

◆ operator-() [6/8]

template<class VecV , class T , class Device >
std::enable_if< std::is_convertible<T, typename VecV::value_type>::value, vector_addition<scalar_vector<T, Device>, vector_scalar_multiply<VecV> >>::type remora::operator- ( t,
vector_expression< VecV, Device > const &  v 
)

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

Definition at line 161 of file vector_expression.hpp.

◆ operator-() [7/8]

template<class MatA , class T , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type>::value , matrix_addition<MatA, matrix_scalar_multiply<scalar_matrix<T,Device> > >>::type remora::operator- ( matrix_expression< MatA, Device > const &  A,
t 
)

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

Definition at line 192 of file matrix_expression.hpp.

◆ operator-() [8/8]

template<class MatA , class T , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type>::value, matrix_addition<scalar_matrix<T,Device>, matrix_scalar_multiply<MatA> >>::type remora::operator- ( t,
matrix_expression< MatA, Device > const &  A 
)

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

Definition at line 204 of file matrix_expression.hpp.

◆ operator-=() [1/5]

template<class VecX , class VecV , class Device >
VecX& remora::operator-= ( vector_expression< VecX, Device > &  x,
vector_expression< VecV, Device > 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 376 of file assignment.hpp.

References remora::detail::plus_assign().

◆ operator-=() [2/5]

template<class VecX , class T , class Device >
std::enable_if<std::is_convertible<T, typename VecX::value_type>::value,VecX&>::type remora::operator-= ( vector_expression< VecX, Device > &  x,
t 
)

Subtracts a scalar from all elements of the vector.

Performs the operation x_i += t for all elements.

Definition at line 423 of file assignment.hpp.

◆ operator-=() [3/5]

template<class MatA , class MatB , class Device >
MatA& remora::operator-= ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > 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 475 of file assignment.hpp.

References remora::detail::plus_assign().

◆ operator-=() [4/5]

template<class MatA , class T , class Device >
std::enable_if<std::is_convertible<T, typename MatA::value_type>::value,MatA&>::type remora::operator-= ( matrix_expression< MatA, Device > &  A,
t 
)

Subtracts a scalar from all elements of the matrix.

Performs the operation A_ij -= t for all elements.

Definition at line 525 of file assignment.hpp.

◆ operator-=() [5/5]

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

Definition at line 562 of file assignment.hpp.

◆ operator/=() [1/5]

template<class VecX , class VecV , class Device >
VecX& remora::operator/= ( vector_expression< VecX, Device > &  x,
vector_expression< VecV, Device > 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 402 of file assignment.hpp.

References divide_assign().

◆ operator/=() [2/5]

template<class VecX , class T , class Device >
std::enable_if<std::is_convertible<T, typename VecX::value_type>::value,VecX&>::type remora::operator/= ( vector_expression< VecX, Device > &  x,
t 
)

Divides all elements of the vector by a scalar.

Performs the operation x_i /= t for all elements.

Definition at line 443 of file assignment.hpp.

◆ operator/=() [3/5]

template<class MatA , class MatB , class Device >
MatA& remora::operator/= ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > 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 503 of file assignment.hpp.

References divide_assign().

◆ operator/=() [4/5]

template<class MatA , class T , class Device >
std::enable_if<std::is_convertible<T, typename MatA::value_type>::value,MatA&>::type remora::operator/= ( matrix_expression< MatA, Device > &  A,
t 
)

Divides all elements of the matrix by a scalar.

Performs the operation A_ij /= t for all elements.

Definition at line 545 of file assignment.hpp.

◆ operator/=() [5/5]

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

Definition at line 572 of file assignment.hpp.

◆ operator<<() [1/2]

template<class E , class T , class VE >
std::basic_ostream<E, T>& remora::operator<< ( std::basic_ostream< E, T > &  os,
const vector_expression< VE, cpu_tag > &  vec 
)

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 example:

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
vecis a vector expression
Returns
a reference to the resulting output stream

Definition at line 63 of file io.hpp.

References eval_block().

◆ operator<<() [2/2]

template<class E , class T , class ME >
std::basic_ostream<E, T>& remora::operator<< ( std::basic_ostream< E, T > &  os,
const matrix_expression< ME, cpu_tag > &  mat 
)

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 example:

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 simple 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
matis a matrix expression
Returns
a reference to the resulting output stream

Definition at line 106 of file io.hpp.

References eval_block().

◆ operator|() [1/8]

template<class VecV1 , class VecV2 , class Device >
vector_concat<VecV1,VecV2> remora::operator| ( vector_expression< VecV1, Device > const &  v1,
vector_expression< VecV2, Device > const &  v2 
)

Concatenates two vectors.

Given two vectors v and w, forms the vector (v,w).

Definition at line 376 of file vector_expression.hpp.

◆ operator|() [2/8]

template<class VecV , class T , class Device >
std::enable_if< std::is_convertible<T, typename VecV::value_type>::value, vector_concat<VecV, scalar_vector<T, Device> >>::type remora::operator| ( vector_expression< VecV, Device > const &  v,
t 
)

Concatenates a vector with a scalar.

Given a vector v and a scalar t, forms the vector (v,t)

Definition at line 390 of file vector_expression.hpp.

◆ operator|() [3/8]

template<class T , class VecV , class Device >
std::enable_if< std::is_convertible<T, typename VecV::value_type>::value, vector_concat<scalar_vector<T, Device>,VecV >>::type remora::operator| ( t,
vector_expression< VecV, Device > const &  v 
)

Concatenates a vector with a scalar.

Given a vector v and a scalar t, forms the vector (v,t)

Definition at line 404 of file vector_expression.hpp.

◆ operator|() [4/8]

template<class MatA , class MatB , class Device >
matrix_concat<MatA, MatB, true> remora::operator| ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B 
)

Forms the block matrix (A|B) where B is to the right of A.

Definition at line 515 of file matrix_expression.hpp.

◆ operator|() [5/8]

template<class MatA , class VecV , class Device >
auto remora::operator| ( matrix_expression< MatA, Device > const &  A,
vector_expression< VecV, Device > const &  v 
) -> decltype(A | trans(repeat(v,1)))

Forms the block matrix (A|v) where v is a column vector to the right of A.

Definition at line 524 of file matrix_expression.hpp.

References repeat(), and trans().

◆ operator|() [6/8]

template<class MatA , class VecV , class Device >
auto remora::operator| ( vector_expression< VecV, Device > const &  v,
matrix_expression< MatA, Device > const &  A 
) -> decltype(trans(repeat(v,1)) | A)

Forms the block matrix (v|A) where v is a column vector to the left of A.

Definition at line 533 of file matrix_expression.hpp.

References repeat(), and trans().

◆ operator|() [7/8]

template<class MatA , class T , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type>::value, matrix_concat<MatA, scalar_matrix<T, Device>, true > >::type remora::operator| ( matrix_expression< MatA, Device > const &  A,
T const &  t 
)

Forms the block matrix (A|t)

The scalar t is interpreted as column vector

Definition at line 547 of file matrix_expression.hpp.

References repeat().

◆ operator|() [8/8]

template<class MatA , class T , class Device >
std::enable_if< std::is_convertible<T, typename MatA::value_type>::value, matrix_concat<scalar_matrix<T, Device>, MatA, true > >::type remora::operator| ( T const &  t,
matrix_expression< MatA, Device > const &  A 
)

Forms the block matrix (t|A)

The scalar t is interpreted as column vector

Definition at line 561 of file matrix_expression.hpp.

References repeat().

◆ outer_prod()

template<class VecA , class VecB , class Device >
outer_product<VecA, VecB > remora::outer_prod ( vector_expression< VecA, Device > const &  v1,
vector_expression< VecB, Device > const &  v2 
)

◆ plus_assign() [1/4]

◆ plus_assign() [2/4]

template<class VecX , class VecV , class Device >
VecX& remora::plus_assign ( vector_expression< VecX, Device > &  x,
vector_expression< VecV, Device > const &  v,
typename VecX::value_type  alpha 
)

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 202 of file assignment.hpp.

References remora::detail::plus_assign().

◆ plus_assign() [3/4]

template<class MatA , class MatB , class Device >
MatA& remora::plus_assign ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > 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 307 of file assignment.hpp.

References remora::detail::plus_assign().

◆ plus_assign() [4/4]

template<class MatA , class MatB , class Device >
MatA& remora::plus_assign ( matrix_expression< MatA, Device > &  A,
matrix_expression< MatB, Device > const &  B,
typename MatA::value_type  alpha 
)

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 319 of file assignment.hpp.

References remora::detail::plus_assign().

◆ prod() [1/3]

template<class MatA , class VecV , class Device >
detail::matrix_vector_prod_optimizer<MatA,VecV>::type remora::prod ( matrix_expression< MatA, Device > const &  A,
vector_expression< VecV, Device > const &  v 
)

computes the matrix-vector product x+=Av

The call to prod does not compute the product itself but instead, as all other expressions, it returns an expression-object which can compute it. In contrast to other expression, this expression is optimized to make use of well known mathematical identities to reduce run time of the algorithm.

Definition at line 292 of file matrix_expression.hpp.

Referenced by shark::blas::applyHouseholderOnTheLeft(), shark::blas::applyHouseholderOnTheRight(), benchmark(), shark::ReferenceVectorGuidedSelection< shark::Individual >::cosAngles(), createData(), remora::bindings::createTRMMBlockKernel(), remora::bindings::createTRMVBlockKernel(), remora::bindings::createTRSMDiagBlockKernel(), remora::bindings::createTRSVDiagBlockKernel(), remora::detail::distanceSqrBlockBlock(), 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::ConvexCombination::eval(), shark::ProductKernel< MultiTaskSample< InputTypeT > >::eval(), shark::PolynomialKernel< InputType >::eval(), shark::KernelExpansion< InputType >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::RotatedObjectiveFunction::evalDerivative(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::evalDerivative(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::FFNet< HiddenNeuron, OutputNeuron >::evalLayer(), shark::GaussianLayer::expectedParameterDerivative(), shark::BipolarLayer::expectedParameterDerivative(), shark::BinaryLayer::expectedParameterDerivative(), shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::inputHidden(), shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::inputVisible(), shark::LinearSAGTrainer< InputType, LabelType >::numberOfParameters(), operator%(), shark::GaussianLayer::parameterDerivative(), shark::BipolarLayer::parameterDerivative(), shark::BinaryLayer::parameterDerivative(), prod(), shark::RotatedObjectiveFunction::proposeStartingPoint(), shark::QpMcLinear< InputT >::solve(), remora::symm_pos_semi_definite_solver< MatrixStorage >::solve(), remora::cg_solver< MatA >::solve(), shark::NormalizeComponentsZCA::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::ReferenceVectorAdaptation< shark::Individual >::updateAngles(), shark::LinearKernel< InputType >::weightedInputDerivative(), shark::MonomialKernel< InputType >::weightedInputDerivative(), shark::ConvexCombination::weightedInputDerivative(), shark::GaussianRbfKernel< InputType >::weightedInputDerivative(), shark::PolynomialKernel< InputType >::weightedInputDerivative(), shark::ConvexCombination::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 , class Device >
auto remora::prod ( vector_expression< VecV, Device > const &  v,
matrix_expression< MatA, Device > const &  A 
) -> decltype(prod(trans(A),v))

computes the matrix-vector product x+=v^TA

it is computed via the identity (v^TA)^T= A^Tv

The call to prod does not compute the product itself but instead, as all other expressions, it returns an expression-object which can compute it. In contrast to other expression, this expression is optimized to make use of well known mathematical identities to reduce run time of the algorithm.

Definition at line 307 of file matrix_expression.hpp.

References prod(), and trans().

◆ prod() [3/3]

template<class MatA , class MatB , class Device >
detail::matrix_matrix_prod_optimizer<MatA,MatB>::type remora::prod ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B 
)

computes the matrix-matrix product X+=AB

Definition at line 350 of file matrix_expression.hpp.

◆ repeat() [1/3]

template<class VecV , class Device >
vector_repeater<VecV> remora::repeat ( vector_expression< VecV, Device > 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 65 of file matrix_expression.hpp.

References rows().

Referenced by shark::GibbsOperator< RBMType >::createSample(), remora::detail::distanceSqrBlockBlock(), shark::Energy< RBM >::energyFromHiddenInput(), shark::Energy< RBM >::energyFromVisibleInput(), shark::MissingFeaturesKernelExpansion< InputType >::eval(), shark::LinearModel< VectorType >::eval(), shark::Normalizer< DataType >::eval(), shark::KernelExpansion< InputType >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::ExactGradient< RBMType >::evalDerivative(), shark::ContrastiveDivergence< Operator >::evalDerivative(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::FFNet< HiddenNeuron, OutputNeuron >::evalLayer(), shark::ExactGradient< RBMType >::getLogPartition(), shark::Adam::init(), shark::VDCMA::init(), shark::NSGA3Indicator::init(), shark::LMCMA::init(), shark::negativeLogLikelihoodFromLogPartition(), shark::NormalDistributedPoints::NormalDistributedPoints(), shark::LinearSAGTrainer< InputType, LabelType >::numberOfParameters(), operator &(), shark::ReferenceVectorAdaptation< shark::Individual >::operator()(), shark::ReferenceVectorGuidedSelection< shark::Individual >::operator()(), operator|(), shark::blas::randomRotationMatrix(), shark::CrossEntropyMethod::setVariance(), shark::MarkovChain< Operator >::step(), shark::RegularizationNetworkTrainer< InputType >::train(), shark::LassoRegression< InputVectorType >::train(), shark::LogisticRegression< InputVectorType >::train(), and shark::OneClassSvmTrainer< InputType, CacheType >::trainSVM().

◆ repeat() [2/3]

template<class T >
std::enable_if<std::is_arithmetic<T>::value, scalar_vector<T, cpu_tag> >::type remora::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 69 of file vector_expression.hpp.

◆ repeat() [3/3]

template<class T >
std::enable_if<std::is_arithmetic<T>::value, scalar_matrix<T,cpu_tag> >::type remora::repeat ( scalar,
std::size_t  rows,
std::size_t  columns 
)

Repeats a single element to form a matrix of size rows x columns.

TODO: cpu only!

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 77 of file matrix_expression.hpp.

References columns(), and rows().

◆ row() [1/3]

template<class M , class Device >
temporary_proxy<typename detail::matrix_row_optimizer<M>::type> remora::row ( matrix_expression< M, Device > &  expression,
typename M::size_type  i 
)

Returns a vector-proxy representing the i-th row of the Matrix.

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

the row(A,1) operation results in row(A,1) = (4,5,6)

Definition at line 89 of file matrix_proxy.hpp.

Referenced by shark::QpMcLinear< InputT >::add_scaled(), shark::RemoveBudgetMaintenanceStrategy< InputType >::addToModel(), shark::ProjectBudgetMaintenanceStrategy< RealVector >::addToModel(), shark::MergeBudgetMaintenanceStrategy< RealVector >::addToModel(), shark::GruauPole::balanceFit(), remora::compressed_matrix< T, I >::clear_range(), column(), shark::ReferenceVectorGuidedSelection< shark::Individual >::cosAngles(), remora::detail::distanceSqrBlockBlock(), remora::detail::distanceSqrBlockBlockRowWise(), remora::detail::distanceSqrBlockVector(), 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::CARTree< unsigned int >::eval(), shark::CrossEntropy::eval(), shark::Classifier< KernelExpansion< InputType > >::eval(), shark::SquaredLoss< OutputType, unsigned int >::eval(), shark::ZeroOneLoss< unsigned int, RealVector >::eval(), shark::NearestNeighborRegression< InputType >::eval(), shark::SoftNearestNeighborClassifier< InputType >::eval(), shark::ARDKernelUnconstrained< InputType >::eval(), shark::NonMarkovPole::eval(), shark::NormalizedKernel< InputType >::eval(), shark::SquaredEpsilonHingeLoss::evalDerivative(), shark::HuberLoss::evalDerivative(), shark::TukeyBiweightLoss::evalDerivative(), shark::CrossEntropy::evalDerivative(), shark::MultiObjectiveBenchmark< Objectives >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::exportFiltersToPGMGrid(), shark::ReferenceVectorGuidedSelection< shark::Individual >::extractPopulationFitness(), shark::AbstractKernelFunction< MultiTaskSample< InputTypeT > >::featureDistanceSqr(), shark::AbstractBudgetMaintenanceStrategy< RealVector >::findSmallestVector(), shark::GruauPole::generalFit(), shark::ExactGradient< RBMType >::getLogPartition(), shark::TreeNearestNeighbors< InputType, LabelType >::getNeighbors(), shark::QpMcBoxDecomp< Matrix >::gradientUpdate(), shark::QpMcSimplexDecomp< Matrix >::gradientUpdate(), shark::GruauPole::gruauFit(), shark::HierarchicalClustering< InputT >::hardMembership(), shark::AbstractClustering< RealVector >::hardMembership(), shark::IHR1::init(), shark::IHR3::init(), shark::IHR4::init(), shark::IHR2::init(), shark::IHR6::init(), shark::NSGA3Indicator::init(), shark::MarkovChain< Operator >::initializeChain(), shark::TemperedMarkovChain< Operator >::initializeChain(), remora::compressed_matrix< T, I >::inner_nnz(), shark::JaakkolaHeuristic::JaakkolaHeuristic(), shark::Energy< RBM >::logUnnormalizedProbabilityHidden(), shark::Energy< RBM >::logUnnormalizedProbabilityVisible(), main(), remora::bindings::matrix_assign(), remora::bindings::matrix_assign_functor(), shark::QpMcSimplexDecomp< Matrix >::maxGainBox(), shark::QpMcSimplexDecomp< Matrix >::maxGainSimplex(), shark::CSvmDerivative< InputType, CacheType >::modelCSvmParameterDerivative(), shark::LinearSAGTrainer< InputType, LabelType >::numberOfParameters(), shark::ReferenceVectorAdaptation< shark::Individual >::operator()(), shark::ReferenceVectorGuidedSelection< shark::Individual >::operator()(), shark::ReferenceVectorGuidedSelection< shark::Individual >::populationPartition(), shark::MergeBudgetMaintenanceStrategy< RealVector >::reduceBudget(), remora::compressed_matrix< T, I >::reserve_row(), row(), remora::compressed_matrix< T, I >::row_capacity(), shark::sampleLatticeUniformly(), shark::QpMcBoxDecomp< Matrix >::selectWorkingSet(), remora::compressed_matrix< T, I >::set_element(), shark::ConvexCombination::setParameterVector(), shark::AbstractClustering< RealVector >::softMembership(), shark::QpMcLinear< InputT >::solve(), shark::BiasSolver< Matrix >::solve(), shark::BiasSolverSimplex< Matrix >::solve(), shark::KernelExpansion< InputType >::sparsify(), shark::GaussianLayer::sufficientStatistics(), shark::BipolarLayer::sufficientStatistics(), shark::BinaryLayer::sufficientStatistics(), shark::TruncatedExponentialLayer::sufficientStatistics(), shark::LassoRegression< InputVectorType >::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::train(), shark::LinearCSvmTrainer< InputType >::train(), shark::SquaredHingeLinearCSvmTrainer< InputType >::train(), remora::bindings::trsv_impl(), shark::QpMcBoxDecomp< Matrix >::unshrink(), shark::QpMcSimplexDecomp< Matrix >::unshrink(), shark::ReferenceVectorAdaptation< shark::Individual >::updateAngles(), 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 , class Device >
detail::matrix_row_optimizer<typename const_expression<M>::type>::type remora::row ( matrix_expression< M, Device > const &  expression,
typename M::size_type  i 
)

Definition at line 94 of file matrix_proxy.hpp.

◆ row() [3/3]

template<class M >
temporary_proxy<typename detail::matrix_row_optimizer<M>::type> remora::row ( temporary_proxy< M >  expression,
typename M::size_type  i 
)

Definition at line 100 of file matrix_proxy.hpp.

References row().

◆ rows() [1/3]

◆ rows() [2/3]

template<class M , class Device >
auto remora::rows ( matrix_expression< M, Device > const &  expression,
std::size_t  start,
std::size_t  stop 
) -> decltype(subrange(expression, start, stop, 0,expression().size2()))

Definition at line 220 of file matrix_proxy.hpp.

References subrange().

◆ rows() [3/3]

template<class M >
auto remora::rows ( temporary_proxy< M >  expression,
std::size_t  start,
std::size_t  stop 
) -> decltype( rows(static_cast<M&>(expression),start,stop))

Definition at line 230 of file matrix_proxy.hpp.

References rows().

◆ safe_div() [1/2]

template<class VecV1 , class VecV2 , class Device >
vector_binary<VecV1, VecV2, typename device_traits<Device>:: template safe_divide<typename common_value_type<VecV1,VecV2>::type > > remora::safe_div ( vector_expression< VecV1, Device > const &  v1,
vector_expression< VecV2, Device > const &  v2,
typename common_value_type< VecV1, VecV2 >::type  defaultValue 
)

Definition at line 232 of file vector_expression.hpp.

◆ safe_div() [2/2]

template<class MatA , class MatB , class Device >
matrix_binary<MatA, MatB, typename device_traits<Device>:: template safe_divide<typename common_value_type<MatA,MatB>::type> > remora::safe_div ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B,
typename common_value_type< MatA, MatB >::type  defaultValue 
)

◆ soft_max()

template<class VecV , class Device >
VecV::value_type remora::soft_max ( vector_expression< VecV, Device > const &  v)

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 306 of file vector_expression.hpp.

References max(), and sum().

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

◆ solve() [1/2]

template<class MatA , class VecB , bool Left, class Device , class SystemType >
detail::matrix_vector_solve_optimizer<MatA,VecB, SystemType, system_tag<Left> >::type remora::solve ( matrix_expression< MatA, Device > const &  A,
vector_expression< VecB, Device > const &  b,
SystemType  t,
system_tag< Left >   
)

◆ solve() [2/2]

template<class MatA , class MatB , bool Left, class Device , class SystemType >
detail::matrix_matrix_solve_optimizer<MatA,MatB, SystemType, system_tag<Left> >::type remora::solve ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B,
SystemType  t,
system_tag< Left >   
)

Definition at line 476 of file solve.hpp.

◆ subrange() [1/6]

template<class V , class Device >
temporary_proxy<typename detail::vector_range_optimizer<V>::type> remora::subrange ( vector_expression< V, Device > &  expression,
std::size_t  start,
std::size_t  stop 
)

Return a subrange of a specified vector, forming a vector for the specified indices between start and stop index.

The vector starts with first index being 0 for the element that is indexed with start in the original vector.

Definition at line 50 of file vector_proxy.hpp.

◆ subrange() [2/6]

template<class V , class Device >
detail::vector_range_optimizer<typename const_expression<V>::type>::type remora::subrange ( vector_expression< V, Device > const &  expression,
std::size_t  start,
std::size_t  stop 
)

Definition at line 56 of file vector_proxy.hpp.

◆ subrange() [3/6]

template<class V >
temporary_proxy<typename detail::vector_range_optimizer<V>::type> remora::subrange ( temporary_proxy< V >  expression,
std::size_t  start,
std::size_t  stop 
)

Definition at line 62 of file vector_proxy.hpp.

References subrange().

◆ subrange() [4/6]

template<class M , class Device >
temporary_proxy< typename detail::matrix_range_optimizer<M>::type > remora::subrange ( matrix_expression< M, Device > &  expression,
std::size_t  start1,
std::size_t  stop1,
std::size_t  start2,
std::size_t  stop2 
)

Returns a submatrix of a given matrix.

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

the subrange(A,0,2,1,3) operation results in subrange(A,0,2,1,3) = (4 5) (7 8)

Definition at line 176 of file matrix_proxy.hpp.

Referenced by shark::ProjectBudgetMaintenanceStrategy< RealVector >::addToModel(), shark::BarsAndStripes::BarsAndStripes(), shark::FFNet< HiddenNeuron, OutputNeuron >::bias(), shark::calculateKernelMatrixParameterDerivative(), shark::calculateMixedKernelMatrix(), shark::calculateRegularizedKernelMatrix(), columns(), createProblem(), remora::bindings::eigensort(), shark::LooErrorCSvm< InputType, CacheType >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::eval(), shark::SvmLogisticInterpretation< InputType >::eval(), shark::KernelExpansion< InputType >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::NegativeGaussianProcessEvidence< InputType, OutputType, LabelType >::evalDerivative(), shark::SvmLogisticInterpretation< InputType >::evalDerivative(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::exportFiltersToPGMGrid(), shark::NSGA3Indicator::init(), shark::JaakkolaHeuristic::JaakkolaHeuristic(), shark::CSvmDerivative< InputType, CacheType >::modelCSvmParameterDerivative(), shark::OneVersusOneClassifier< InputType >::parameterVector(), shark::ProductKernel< MultiTaskSample< InputTypeT > >::parameterVector(), shark::OneClassSvmTrainer< InputType, CacheType >::parameterVector(), shark::WeightedSumKernel< InputType >::parameterVector(), shark::FFNet< HiddenNeuron, OutputNeuron >::parameterVector(), remora::bindings::pstrf(), shark::blas::randomRotationMatrix(), rows(), shark::FFNet< HiddenNeuron, OutputNeuron >::setLayer(), shark::OnlineRNNet::setOutputActivation(), shark::OneVersusOneClassifier< InputType >::setParameterVector(), shark::EpsilonSvmTrainer< InputType, CacheType >::setParameterVector(), shark::ProductKernel< MultiTaskSample< InputTypeT > >::setParameterVector(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::LinearModel< VectorType >::setParameterVector(), shark::OneClassSvmTrainer< InputType, CacheType >::setParameterVector(), shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::setParameterVector(), shark::Normalizer< DataType >::setParameterVector(), shark::GaussianTaskKernel< InputTypeT >::setParameterVector(), shark::WeightedSumKernel< InputType >::setParameterVector(), shark::KernelExpansion< InputType >::setParameterVector(), shark::FFNet< HiddenNeuron, OutputNeuron >::setParameterVector(), shark::KernelSGDTrainer< InputType, CacheType >::setParameterVector(), shark::AbstractSvmTrainer< InputType, unsigned int, KernelExpansion< InputType > >::setParameterVector(), shark::KernelBudgetedSGDTrainer< InputType, CacheType >::setParameterVector(), subrange(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::LogisticRegression< InputVectorType >::train(), remora::bindings::trsm_recursive(), shark::QpMcBoxDecomp< Matrix >::unshrink(), shark::QpMcSimplexDecomp< Matrix >::unshrink(), remora::cholesky_decomposition< remora::matrix< double, blas::column_major > >::update(), 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 , class Device >
detail::matrix_range_optimizer<typename const_expression<M>::type>::type remora::subrange ( matrix_expression< M, Device > const &  expression,
std::size_t  start1,
std::size_t  stop1,
std::size_t  start2,
std::size_t  stop2 
)

Definition at line 188 of file matrix_proxy.hpp.

◆ subrange() [6/6]

template<class M , class Device >
auto remora::subrange ( temporary_proxy< M >  expression,
std::size_t  start1,
std::size_t  stop1,
std::size_t  start2,
std::size_t  stop2 
) -> decltype(subrange(static_cast<M&>(expression),start1,stop1,start2,stop2))

Definition at line 201 of file matrix_proxy.hpp.

References subrange().

◆ sum() [1/2]

template<class VecV , class Device >
VecV::value_type remora::sum ( vector_expression< VecV, Device > const &  v)

sum v = sum_i v_i

Definition at line 249 of file vector_expression.hpp.

References eval_block().

◆ sum() [2/2]

template<class MatA , class Device >
MatA::value_type remora::sum ( matrix_expression< MatA, Device > const &  A)

Definition at line 406 of file matrix_expression.hpp.

References eval_block().

Referenced by createRandomFront(), remora::detail::diagonalMahalanobisDistanceSqr(), 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::NegativeLogLikelihood::eval(), shark::ZDT3::eval(), shark::ZDT2::eval(), shark::ZDT1::eval(), shark::ZDT6::eval(), shark::LooErrorCSvm< InputType, CacheType >::eval(), shark::ZDT4::eval(), shark::Rosenbrock::eval(), shark::PointSetKernel< InputType >::eval(), shark::CrossEntropy::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::CSvmTrainer< InputType, CacheType >::get_db_dParams(), shark::VDCMA::init(), shark::NSGA3Indicator::init(), shark::LMCMA::init(), shark::HypervolumeContributionMD::largest(), main(), shark::negativeLogLikelihoodFromLogPartition(), norm_1(), norm_frobenius(), norm_sqr(), shark::LinearSAGTrainer< InputType, LabelType >::numberOfParameters(), shark::RouletteWheelSelection::operator()(), shark::LinearRankingSelection< Ordering >::operator()(), shark::HypervolumeApproximator::operator()(), shark::MissingFeatureSvmTrainer< InputType, CacheType >::setMaxIterations(), shark::ConvexCombination::setParameterVector(), shark::HypervolumeContributionMD::smallest(), soft_max(), shark::QpBoxLinear< InputT >::solve(), shark::BiasSolver< Matrix >::solve(), shark::BiasSolverSimplex< Matrix >::solve(), shark::statistics::Mean::statistics(), shark::sumOfWeights(), remora::bindings::tpmv_impl(), trace(), shark::NormalizeKernelUnitVariance< InputType >::train(), shark::EpsilonSvmTrainer< InputType, CacheType >::train(), shark::CSvmTrainer< InputType, CacheType >::train(), shark::LogisticRegression< InputVectorType >::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()

template<class MatA , class Device >
sum_matrix_rows<MatA> remora::sum_rows ( matrix_expression< MatA, Device > const &  A)

Definition at line 395 of file matrix_expression.hpp.

Referenced by norm_1(), and sum_columns().

◆ swap_columns()

template<class VecP , class M >
void remora::swap_columns ( vector_expression< VecP, cpu_tag > const &  P,
matrix_expression< M, cpu_tag > &  A 
)

implements column pivoting at matrix A using permutation P

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

Definition at line 84 of file permutation.hpp.

◆ swap_columns_inverted()

template<class VecP , class M >
void remora::swap_columns_inverted ( vector_expression< VecP, cpu_tag > const &  P,
matrix_expression< M, cpu_tag > &  A 
)

implements the inverse column pivoting at matrix A using permutation P

This is the inverse operation to swap_columns.

Definition at line 103 of file permutation.hpp.

Referenced by remora::symm_pos_semi_definite_solver< MatrixStorage >::compute_inverse_factor(), and remora::pivoting_lu_decomposition< MatrixStorage >::solve().

◆ swap_full()

template<class VecP , class M >
void remora::swap_full ( vector_expression< VecP, cpu_tag > const &  P,
matrix_expression< M, cpu_tag > &  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 115 of file permutation.hpp.

◆ swap_full_inverted()

template<class VecP , class M >
void remora::swap_full_inverted ( vector_expression< VecP, cpu_tag > const &  P,
matrix_expression< M, cpu_tag > &  A 
)

implements the inverse full pivoting at matrix A using permutation P

This is the inverse operation to swap_full.

Definition at line 125 of file permutation.hpp.

◆ swap_rows() [1/2]

template<class VecP , class M >
void remora::swap_rows ( vector_expression< VecP, cpu_tag > const &  P,
matrix_expression< M, cpu_tag > &  A 
)

implements row pivoting at matrix A using permutation P

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

Definition at line 52 of file permutation.hpp.

Referenced by remora::bindings::getrf_recursive(), remora::pivoting_lu_decomposition< MatrixStorage >::solve(), and remora::symm_pos_semi_definite_solver< MatrixStorage >::solve().

◆ swap_rows() [2/2]

template<class VecP , class V >
void remora::swap_rows ( vector_expression< VecP, cpu_tag > const &  P,
vector_expression< V, cpu_tag > &  v 
)

implements column pivoting of vector A using permutation P

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

Definition at line 61 of file permutation.hpp.

References shark::swap().

◆ swap_rows_inverted() [1/2]

template<class VecP , class V >
void remora::swap_rows_inverted ( vector_expression< VecP, cpu_tag > const &  P,
vector_expression< V, cpu_tag > &  v 
)

implements the inverse row pivoting of vector v using permutation P

This is the inverse operation to swap_rows.

Definition at line 70 of file permutation.hpp.

References shark::swap().

Referenced by remora::pivoting_lu_decomposition< MatrixStorage >::solve(), and remora::symm_pos_semi_definite_solver< MatrixStorage >::solve().

◆ swap_rows_inverted() [2/2]

template<class VecP , class M >
void remora::swap_rows_inverted ( vector_expression< VecP, cpu_tag > const &  P,
matrix_expression< M, cpu_tag > &  A 
)

implements the inverse row pivoting at matrix A using permutation P

This is the inverse operation to swap_rows.

Definition at line 93 of file permutation.hpp.

◆ to_diagonal()

◆ to_matrix() [1/3]

template<class V , class Tag >
std::enable_if< std::is_same<typename V::storage_type::storage_tag,dense_tag>::value, temporary_proxy< dense_matrix_adaptor< typename std::remove_reference<typename V::reference>::type,row_major, Tag > >>::type remora::to_matrix ( vector_expression< V, Tag > &  v,
std::size_t  size1,
std::size_t  size2 
)

◆ to_matrix() [2/3]

template<class V , class Tag >
std::enable_if< std::is_same<typename V::storage_type::storage_tag,dense_tag>::value, temporary_proxy< dense_matrix_adaptor<typename V::value_type const,row_major, Tag> >>::type remora::to_matrix ( vector_expression< V, Tag > const &  v,
std::size_t  size1,
std::size_t  size2 
)

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

Definition at line 304 of file matrix_proxy.hpp.

◆ to_matrix() [3/3]

template<class E >
auto remora::to_matrix ( temporary_proxy< E >  e,
std::size_t  size1,
std::size_t  size2 
) -> decltype(to_matrix(static_cast<E&>(e),size1, size2))

Definition at line 313 of file matrix_proxy.hpp.

References to_matrix().

◆ to_vector() [1/3]

◆ to_vector() [2/3]

template<class E , class Device >
std::enable_if< std::is_same<typename E::evaluation_category::tag,dense_tag>::value, temporary_proxy< linearized_matrix<E> >>::type remora::to_vector ( matrix_expression< E, Device > &  e)

Definition at line 335 of file matrix_proxy.hpp.

◆ to_vector() [3/3]

template<class E >
auto remora::to_vector ( temporary_proxy< E >  e) -> decltype(to_vector(static_cast<E&>(e)))

Definition at line 340 of file matrix_proxy.hpp.

References to_vector().

◆ trace()

template<class MatA , class Device >
MatA::value_type remora::trace ( matrix_expression< MatA, Device > const &  A)

Evaluates the trace of matrix A.

The rtace is defined as the sum of the diagonal elements of A, \( \text{trace}(A) = \sum_i A_{ii}\)

Parameters
Asquare matrix
Returns
the sum of the values at the diagonal of A

Definition at line 486 of file matrix_expression.hpp.

References diag(), and sum().

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 , class Device >
temporary_proxy<typename detail::matrix_transpose_optimizer<M>::type> remora::trans ( matrix_expression< M, Device > &  m)

Returns a proxy which transposes the matrix.

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

the trans(A) operation results in trans(A) = (1 4 7) (2 5 8) (3 6 9)

Definition at line 58 of file matrix_proxy.hpp.

Referenced by shark::blas::applyHouseholderOnTheLeft(), column(), remora::symm_pos_semi_definite_solver< MatrixStorage >::compute_inverse_factor(), shark::ReferenceVectorGuidedSelection< shark::Individual >::cosAngles(), createData(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::decoderMatrix(), remora::detail::distanceSqrBlockBlock(), shark::LinearKernel< InputType >::eval(), shark::MonomialKernel< InputType >::eval(), shark::ConvexCombination::eval(), shark::PolynomialKernel< InputType >::eval(), shark::LinearModel< VectorType >::eval(), shark::KernelExpansion< InputType >::eval(), shark::FFNet< HiddenNeuron, OutputNeuron >::eval(), shark::RotatedObjectiveFunction::evalDerivative(), shark::KernelTargetAlignment< InputType, LabelType >::evalDerivative(), shark::TiedAutoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::Autoencoder< HiddenNeuron, OutputNeuron >::evalLayer(), shark::FFNet< HiddenNeuron, OutputNeuron >::evalLayer(), shark::NSGA3Indicator::init(), shark::RBM< VisibleLayerT, HiddenLayerT, randomT >::inputHidden(), remora::kernels::detail::matrix_assign(), remora::kernels::detail::matrix_assign_functor(), operator%(), operator|(), prod(), shark::RotatedObjectiveFunction::proposeStartingPoint(), shark::FFNet< HiddenNeuron, OutputNeuron >::setParameterVector(), remora::symm_eigenvalue_decomposition< RealMatrix >::solve(), remora::symm_pos_semi_definite_solver< MatrixStorage >::solve(), remora::cg_solver< MatA >::solve(), sum_columns(), remora::bindings::syev(), remora::symm_pos_semi_definite_solver< MatrixStorage >::symm_pos_semi_definite_solver(), remora::bindings::syrk(), shark::NormalizeComponentsZCA::train(), shark::LassoRegression< InputVectorType >::train(), shark::KernelSGDTrainer< InputType, CacheType >::train(), trans(), remora::bindings::trmm(), shark::ReferenceVectorAdaptation< shark::Individual >::updateAngles(), remora::cholesky_decomposition< remora::matrix< double, blas::column_major > >::upper_factor(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedDerivatives(), shark::FFNet< HiddenNeuron, OutputNeuron >::weightedInputDerivative(), shark::ConvexCombination::weightedParameterDerivative(), shark::LinearModel< VectorType >::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().

◆ trans() [2/3]

template<class M , class Device >
detail::matrix_transpose_optimizer<typename const_expression<M>::type >::type remora::trans ( matrix_expression< M, Device > const &  m)

Definition at line 63 of file matrix_proxy.hpp.

◆ trans() [3/3]

template<class M >
temporary_proxy<typename detail::matrix_transpose_optimizer<M>::type> remora::trans ( temporary_proxy< M >  m)

Definition at line 70 of file matrix_proxy.hpp.

References trans().

◆ triangular_prod() [1/2]

template<class TriangularType , class MatA , class VecV , class Device >
matrix_vector_prod<detail::dense_triangular_proxy<typename const_expression<MatA>::type,TriangularType> ,VecV> remora::triangular_prod ( matrix_expression< MatA, Device > const &  A,
vector_expression< VecV, Device > &  v 
)

Computes the matrix-vector product x+= alpha * Av or x= alpha * Av.

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

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

Definition at line 339 of file matrix_expression.hpp.

◆ triangular_prod() [2/2]

template<class TriangularType , class MatA , class MatB , class Device >
matrix_matrix_prod<detail::dense_triangular_proxy<typename const_expression<MatA>::type,TriangularType> ,MatB> remora::triangular_prod ( matrix_expression< MatA, Device > const &  A,
matrix_expression< MatB, Device > const &  B 
)

Computes the matrix-vector product x+= alpha * AB or x= alpha * AB.

A is interpreted as triangular matrix. The first template argument governs the type of triangular matrix: lower, upper, unit_lower and unit_upper. B is interpreted as dense matrix.

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

Definition at line 382 of file matrix_expression.hpp.