NABLA  Nabla Ain't Basic Linear Algebra
Classes | Namespaces | Typedefs | Functions
matrix.h File Reference

Contains definitions of matrix and vector template classes and other useful stuff. More...

Go to the source code of this file.

Classes

struct  access_error
 Access error. More...
struct  add< type1, type2 >
 Binary addition operator. More...
struct  base_column_iterator< iterator_type >
 Base type for column iterators. More...
struct  base_matrix_expression< value_t, expr_t, tag, shape >
 Base matrix expression template class. More...
struct  base_matrix_expression< value_t, expr_t, tag, rectangular >
 Base matrix expression template class partial specialization. More...
struct  base_row_iterator< iterator_type >
 Base type for row iterators. More...
struct  base_vector_iterator< iterator_type >
 Base type for vector iterators. More...
class  binary< expression1, expression2, op >
 Binary expression template class. More...
class  binary< vector_expression< value_t, expr1, tag1 >, vector_expression< value_t, expr2, tag2 >, op >
 Binary expression template class specialization. More...
struct  column
 Column vector orientation. More...
struct  column_const_iterator< t >
 Iterator type for iterating over a column of a matrix. More...
struct  column_iterator< t >
 Iterator type for iterating over a column of a matrix. More...
class  column_wrapper< value_t, expr_t, tag_t >
 Column vector wrapper template class. More...
struct  conj< type >
 Unary conjugate operation. More...
struct  const_iterator< t >
 Iterator type for iterating over a vector. More...
struct  const_iterator< vector_ref< expression_type, tag, orientation::column > >
 Iterator type for iterating over a row of a matrix. More...
struct  const_iterator< vector_ref< expression_type, tag, orientation::row > >
 Iterator type for iterating over a row of a matrix. More...
struct  constrained_index
 Constrained index. More...
struct  div< type1, type2 >
 Binary division operator. More...
struct  expr_traits< matrix_expression< value_t, expr_t, tag_t > >
 Expression traits template class partial specialization. More...
struct  expr_traits< shaped_expression< value_t, expr_t, tag_t, shape_t > >
 Expression traits template class partial specialization. More...
struct  expr_traits< vector_expression< value_t, expr_t, tag_t, orientation_t > >
 Expression traits template class partial specialization. More...
struct  expression< complexity >
 Expression tag. More...
struct  iterator< t >
 Iterator type for iterating over a vector. More...
struct  iterator< vector_ref< expression_type, tag, orientation::column > >
 Iterator type for iterating over a row of a matrix. More...
struct  iterator< vector_ref< expression_type, tag, orientation::row > >
 Iterator type for iterating over a row of a matrix. More...
struct  lower_triangular
 Lower triangle shape of matrix. More...
class  matrix< value_t, shape >
 Square matrix template class. More...
class  matrix< value_t, rectangular >
 General matrix template class. More...
struct  matrix_expression< value_t, expr_t, tag >
 Matrix expression template class. More...
struct  minus< type >
 Unary minus operator. More...
struct  mul< type1, type2 >
 Binary multiplication operator. More...
struct  operation< type >
 Unary "no op" operator. More...
struct  pair_const_ref< expr1, expr2 >
 Pair of references. More...
struct  plus< type >
 Unary plus operator. More...
class  product< expression1, expression2 >
 Matrix product template class. More...
class  product< expression1, vector_expression< value_t, expr2, tag2 > >
 Matrix product template class partial specialization. More...
struct  rectangular
 General shape of matrix. More...
struct  reference
 Reference tag. More...
struct  reshape_constraint< target_shape >
 Constraints for reshape operation template class. More...
struct  reshape_constraint< rectangular >
 Constraints for reshape operation template class specialization. More...
struct  reshape_error
 Reshape exception class. More...
struct  reshape_return< matrix_expression< value_t, expr_t, tag >, rectangular, side >
 Defines reshape() return type. More...
struct  reshape_return< matrix_expression< value_t, expr_t, tag >, target_shape, side >
 Defines reshape() return type. More...
class  reshaped< matrix_expression< value_t, expr_t, tag_t >, target_shape, lower_triangular >
 Partial specialization of reshaped. More...
class  reshaped< matrix_expression< value_t, expr_t, tag_t >, target_shape, upper_triangular >
 Partial specialization of reshaped. More...
struct  row
 Row vector orientation. More...
struct  row_const_iterator< t >
 Iterator type for iterating over a row of a matrix. More...
struct  row_iterator< t >
 Iterator type for iterating over a row of a matrix. More...
class  row_wrapper< value_t, expr_t, tag_t >
 Row vector wrapper template class. More...
struct  rvalue< type >
 Represents an "rvalue". More...
class  scaled< expression_type >
 Scaled expression template class. More...
class  scaled< vector_expression< value_t, expr_t, tag_t > >
 Scaled expression template class partial specialization. More...
struct  shaped_expression< value_t, expr_t, tag_t, shape >
 Shaped matrix expression template class. More...
struct  size_error
 Argument size error. More...
struct  storage
 Storage tag. More...
struct  sub< type1, type2 >
 Binary subtraction operator. More...
struct  symmetric
 Symmetric shape of matrix. More...
class  temporary< type >
 Temporary object template class. More...
class  traits< type >
 Type traits class. More...
class  transposed< expression_type, op >
 Transposition expression template class. More...
struct  column_const_iterator< matrix< value_t > >::type
 Iterator type. More...
struct  column_iterator< matrix< value_t > >::type
 Iterator type. More...
struct  row_const_iterator< matrix< value_t > >::type
 Iterator type. More...
struct  row_iterator< matrix< value_t > >::type
 Iterator type. More...
struct  column_const_iterator< matrix< value_t, symmetric > >::type
 Iterator type. More...
struct  column_iterator< matrix< value_t, symmetric > >::type
 Iterator type. More...
struct  row_const_iterator< matrix< value_t, symmetric > >::type
 Iterator type. More...
struct  row_iterator< matrix< value_t, symmetric > >::type
 Iterator type. More...
struct  const_iterator< t >::type
 Iterator type. More...
struct  iterator< t >::type
 Iterator type. More...
struct  column_const_iterator< t >::type
 Iterator type. More...
struct  column_iterator< t >::type
 Iterator type. More...
struct  row_const_iterator< t >::type
 Iterator type. More...
struct  row_iterator< t >::type
 Iterator type. More...
class  unary< expression_type, op >
 Unary expression template class. More...
class  unary< vector_expression< value_t, expr_t, tag_t >, op >
 Unary expression template class specialization. More...
struct  undefined
 Undefined orientation of vector. More...
struct  upper_triangular
 Upper triangle shape of matrix. More...
class  vector< value_t >
 Vector template class. More...
struct  vector_expression< value_t, expr_t, tag, orientation >
 Vector expression template class. More...
class  vector_expression< value_t, expr_t, tag, orientation::column >
 Vector expression template class specialization. More...
class  vector_expression< value_t, expr_t, tag, orientation::row >
 Vector expression template class specialization. More...
class  vector_ref< expression_type, tag::expression< complexity >, orientation::column >
 Constant column reference template class partial specialization. More...
class  vector_ref< expression_type, tag::expression< complexity >, orientation::row >
 Constant row reference template class partial specialization. More...
class  vector_ref< expression_type, tag::reference, orientation::column >
 Column reference template class partial specialization. More...
class  vector_ref< expression_type, tag::reference, orientation::row >
 Row reference template class partial specialization. More...

Namespaces

namespace  nabla
 Contains matrix and vector template classes and related stuff.
namespace  nabla::dummy
 Contains dummy entities.
namespace  nabla::op
 Contains scalar operations.
namespace  nabla::orientation
 Contains definitions for vector orientation types.
namespace  nabla::tag
 Contains expression tags.

Typedefs

typedef lower_triangular lower_tr
 Convenient alias for lower_triangular matrix shape.
typedef upper_triangular upper_tr
 Convenient alias for upper_triangular matrix shape.

Functions

template<typename value_t , typename expr_t , typename tag >
iterator< expr_t >::type begin (vector_expression< value_t, expr_t, tag > &v, size_t i=0)
 Returns iterator.
template<typename value_t , typename expr_t , typename tag >
const_iterator< expr_t >::type begin (const vector_expression< value_t, expr_t, tag > &v, size_t i=0)
 Returns iterator.
template<typename value_t >
const value_t & conj (const value_t &a)
 This function returns its argument. It does nothing.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
op::mul< value_t, value_t >
::result_type 
sum_of_products (const vector_expression< value_t, expr1, tag1 > &a, const vector_expression< value_t, expr2, tag2 > &b)
 Returns sum of products of corresponding elements.
Implementation details
template<typename expr_t >
util::non_zero_in_row
< rectangular >::first_type 
first_non_zero_in_row (const expr_t &m, size_t row)
 Returns index of the first non zero element in row row.
template<typename expr_t >
util::non_zero_in_row
< rectangular >::last_type 
last_non_zero_in_row (const expr_t &m, size_t row)
 Returns index of the last non zero element in row row.
template<typename expr_t >
util::non_zero_in_column
< rectangular >::first_type 
first_non_zero_in_column (const expr_t &m, size_t column)
 Returns index of the first non zero element in column column.
template<typename expr_t >
util::non_zero_in_column
< rectangular >::last_type 
last_non_zero_in_column (const expr_t &m, size_t column)
 Returns index of the last non zero element in column column.
template<typename expr_t >
orientation::undefined orientation_type (expr_t *)
 Defines orientation type for arbitrary vector.
template<typename type >
rvalue< type > & to_rvalue_ref (type &a)
 Turns a reference into a "reference to rvalue".
template<typename expression_type , typename tag >
util::non_zero_in_row
< typename expr_traits
< expression_type >::shape >
::first_type 
first_non_zero (const vector_ref< expression_type, tag, orientation::row > &v)
 Returns index of the first non zero element in row reference.
template<typename expression_type , typename tag >
util::non_zero_in_row
< typename expr_traits
< expression_type >::shape >
::last_type 
last_non_zero (const vector_ref< expression_type, tag, orientation::row > &v)
 Returns index of the last non zero element in row reference.
template<typename expression_type , typename tag >
util::non_zero_in_column
< typename expr_traits
< expression_type >::shape >
::first_type 
first_non_zero (const vector_ref< expression_type, tag, orientation::column > &v)
 Returns index of the first non zero element in row reference.
template<typename expression_type , typename tag >
util::non_zero_in_column
< typename expr_traits
< expression_type >::shape >
::last_type 
last_non_zero (const vector_ref< expression_type, tag, orientation::column > &v)
 Returns index of the last non zero element in row reference.
template<typename expr_t >
size_t first_non_zero (const expr_t &)
 Returns index of the first non zero element in vector v.
template<typename expr_t >
size_t last_non_zero (const expr_t &v)
 Returns index of the first non zero element in row row.
template<typename expr1 , typename expr2 >
size_t first_non_zero (const expr1 &a, const expr2 &b)
 Returns index of the first non zero element in both vectors.
template<typename expr1 , typename expr2 >
size_t last_non_zero (const expr1 &a, const expr2 &b)
 Returns index of the last non zero element in both vectors.
Miscellaneous
template<typename value_t , typename expr_t , typename tag >
expr_t & get_matrix (matrix_expression< value_t, expr_t, tag > &a)
 Returns underlying matrix expression.
template<typename value_t , typename expr_t , typename tag >
const expr_t & get_matrix (const matrix_expression< value_t, expr_t, tag > &a)
 Returns underlying matrix expression.
template<typename value_t , typename expr_t , typename tag >
expr_t & get_vector (vector_expression< value_t, expr_t, tag > &a)
 Returns underlying vector expression.
template<typename value_t , typename expr_t , typename tag >
const expr_t & get_vector (const vector_expression< value_t, expr_t, tag > &a)
 Returns underlying vector expression.
template<typename value_t , typename expr_t >
void swap (matrix_expression< value_t, expr_t, tag::storage > &a, matrix_expression< value_t, expr_t, tag::storage > &b)
 Swaps contents of two matrices.
template<typename value_t , typename expr_t , typename shape >
void swap (shaped_expression< value_t, expr_t, tag::storage, shape > &a, shaped_expression< value_t, expr_t, tag::storage, shape > &b)
 Swaps contents of two matrices.
template<typename target_shape , typename value_t , typename expr_t , typename tag >
util::reshape_return
< matrix_expression< value_t,
expr_t, tag >, target_shape >
::type 
reshape (const matrix_expression< value_t, expr_t, tag > &a)
 Reshapes a matrix expression.
template<typename target_shape , typename side , typename value_t , typename expr_t , typename tag >
util::reshape_return
< matrix_expression< value_t,
expr_t, tag >, target_shape,
side >::type 
reshape (const matrix_expression< value_t, expr_t, tag > &a)
 Returns underlying matrix expression.
template<typename value_t , typename expr_t , typename tag >
util::row_ref
< matrix_expression< value_t,
expr_t, tag > >::type 
row (matrix_expression< value_t, expr_t, tag > &a, size_t r)
 Returns reference to a matrix row.
template<typename value_t , typename expr_t , typename tag_t >
util::const_row_ref
< matrix_expression< value_t,
expr_t, tag_t > >::type 
row (const matrix_expression< value_t, expr_t, tag_t > &a, size_t r)
 Returns reference to a matrix row.
template<typename value_t , typename expr_t , typename tag , typename shape >
util::row_ref
< shaped_expression< value_t,
expr_t, tag, shape > >::type 
row (shaped_expression< value_t, expr_t, tag, shape > &a, size_t r)
 Returns reference to a matrix row.
template<typename value_t , typename expr_t , typename tag_t , typename shape >
util::const_row_ref
< shaped_expression< value_t,
expr_t, tag_t, shape > >::type 
row (const shaped_expression< value_t, expr_t, tag_t, shape > &a, size_t r)
 Returns reference to a matrix row.
template<typename value_t , typename expr_t , typename tag >
util::column_ref
< matrix_expression< value_t,
expr_t, tag > >::type 
column (matrix_expression< value_t, expr_t, tag > &a, size_t c)
 Returns reference to a matrix column.
template<typename value_t , typename expr_t , typename tag_t >
util::const_column_ref
< matrix_expression< value_t,
expr_t, tag_t > >::type 
column (const matrix_expression< value_t, expr_t, tag_t > &a, size_t c)
 Returns reference to a matrix column.
template<typename value_t , typename expr_t , typename tag , typename shape >
util::column_ref
< shaped_expression< value_t,
expr_t, tag, shape > >::type 
column (shaped_expression< value_t, expr_t, tag, shape > &a, size_t c)
 Returns reference to a matrix column.
template<typename value_t , typename expr_t , typename tag_t , typename shape >
util::const_column_ref
< shaped_expression< value_t,
expr_t, tag_t, shape > >::type 
column (const shaped_expression< value_t, expr_t, tag_t, shape > &a, size_t c)
 Returns reference to a matrix column.
template<typename value_t , typename expr_t >
void swap (vector_expression< value_t, expr_t, tag::storage > &a, vector_expression< value_t, expr_t, tag::storage > &b)
 Swaps contents of two vectors.
template<typename value_t , typename expr1 , typename expr2 >
void swap (vector_expression< value_t, expr1, tag::storage > &a, vector_expression< value_t, expr2, tag::storage > &b)
 Swaps contents of two vector expressions.
template<typename value_t , typename expr1 , typename expr2 , typename orientation >
void swap (vector_expression< value_t, expr1, tag::storage > &a, vector_ref< expr2, tag::reference, orientation > b)
 Swaps contents of two vector expressions.
template<typename expr1 , typename orientation , typename value_t , typename expr2 >
void swap (vector_ref< expr1, tag::reference, orientation > a, vector_expression< value_t, expr2, tag::storage > &b)
 Swaps contents of two vector expressions.
template<typename expr1 , typename orientation1 , typename expr2 , typename orientation2 >
void swap (vector_ref< expr1, tag::reference, orientation1 > a, vector_ref< expr2, tag::reference, orientation2 > b)
 Swaps contents of two vector expressions.
Matrix operations
template<typename value_t , typename expr_t , typename tag >
const unary< matrix_expression
< value_t, expr_t, tag >
, op::plus > 
operator+ (const matrix_expression< value_t, expr_t, tag > &a)
 Unary plus operator.
template<typename value_t , typename expr_t , typename tag , typename shape >
const unary< shaped_expression
< value_t, expr_t, tag, shape >
, op::plus > 
operator+ (const shaped_expression< value_t, expr_t, tag, shape > &a)
 Unary plus operator.
template<typename value_t , typename expr_t , typename tag >
const unary< matrix_expression
< value_t, expr_t, tag >
, op::minus > 
operator- (const matrix_expression< value_t, expr_t, tag > &a)
 Unary minus operator.
template<typename value_t , typename expr_t , typename tag , typename shape >
const unary< shaped_expression
< value_t, expr_t, tag, shape >
, op::minus > 
operator- (const shaped_expression< value_t, expr_t, tag, shape > &a)
 Unary minus operator.
template<typename value_t , typename expr_t , typename tag >
const unary< matrix_expression
< value_t, expr_t, tag >
, op::conj > 
conj (const matrix_expression< value_t, expr_t, tag > &a)
 Returns conjugated matrix.
template<typename value_t , typename expr_t , typename tag , typename shape >
const unary< shaped_expression
< value_t, expr_t, tag, shape >
, op::conj > 
conj (const shaped_expression< value_t, expr_t, tag, shape > &a)
 Returns conjugated matrix.
template<typename value_t , typename expr_t , typename tag >
const transposed
< matrix_expression< value_t,
expr_t, tag > > 
transpose (const matrix_expression< value_t, expr_t, tag > &a)
 Returns transposed matrix.
template<typename value_t , typename expr_t , typename tag , typename shape >
const transposed
< shaped_expression< value_t,
expr_t, tag, shape > > 
transpose (const shaped_expression< value_t, expr_t, tag, shape > &a)
 Returns transposed matrix.
template<typename value_t , typename expr_t , typename tag >
const expr_t & transpose (const shaped_expression< value_t, expr_t, tag, symmetric > &a)
 Returns transposed matrix.
template<typename value_t , typename expr_t , typename tag >
const reshaped
< shaped_expression< value_t,
expr_t, tag, lower_triangular >
, upper_triangular,
lower_triangular > 
transpose (const shaped_expression< value_t, expr_t, tag, lower_triangular > &a)
 Returns transposed matrix.
template<typename value_t , typename expr_t , typename tag >
const reshaped
< shaped_expression< value_t,
expr_t, tag, upper_triangular >
, lower_triangular,
upper_triangular > 
transpose (const shaped_expression< value_t, expr_t, tag, upper_triangular > &a)
 Returns transposed matrix.
template<typename value_t , typename expr_t , typename tag >
const scaled
< matrix_expression< value_t,
expr_t, tag > > 
operator* (const matrix_expression< value_t, expr_t, tag > &a, const typename expr_t::value_type &s)
 Binary multiplication operator.
template<typename value_t , typename expr_t , typename tag , typename shape >
const scaled
< shaped_expression< value_t,
expr_t, tag, shape > > 
operator* (const shaped_expression< value_t, expr_t, tag, shape > &a, const typename expr_t::value_type &s)
 Binary multiplication operator.
template<typename value_t , typename expr_t , typename tag >
const scaled
< matrix_expression< value_t,
expr_t, tag > > 
operator* (const typename expr_t::value_type &s, const matrix_expression< value_t, expr_t, tag > &a)
 Binary multiplication operator.
template<typename value_t , typename expr_t , typename tag , typename shape >
const scaled
< shaped_expression< value_t,
expr_t, tag, shape > > 
operator* (const typename expr_t::value_type &s, const shaped_expression< value_t, expr_t, tag, shape > &a)
 Binary multiplication operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
const binary
< matrix_expression< value_t,
expr1, tag1 >
, matrix_expression< value_t,
expr2, tag2 >, op::add > 
operator+ (const matrix_expression< value_t, expr1, tag1 > &left, const matrix_expression< value_t, expr2, tag2 > &right)
 Binary addition operator.
template<typename value_t , typename expr1 , typename tag1 , typename shape1 , typename expr2 , typename tag2 , typename shape2 >
const binary
< shaped_expression< value_t,
expr1, tag1, shape1 >
, shaped_expression< value_t,
expr2, tag2, shape1 >, op::add > 
operator+ (const shaped_expression< value_t, expr1, tag1, shape1 > &left, const shaped_expression< value_t, expr2, tag2, shape2 > &right)
 Binary addition operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
const binary
< matrix_expression< value_t,
expr1, tag1 >
, matrix_expression< value_t,
expr2, tag2 >, op::sub > 
operator- (const matrix_expression< value_t, expr1, tag1 > &left, const matrix_expression< value_t, expr2, tag2 > &right)
 Binary subtraction operator.
template<typename value_t , typename expr1 , typename tag1 , typename shape1 , typename expr2 , typename tag2 , typename shape2 >
const binary
< shaped_expression< value_t,
expr1, tag1, shape1 >
, shaped_expression< value_t,
expr2, tag2, shape2 >, op::sub > 
operator- (const shaped_expression< value_t, expr1, tag1, shape1 > &left, const shaped_expression< value_t, expr2, tag2, shape2 > &right)
 Binary subtraction operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
const binary
< matrix_expression< value_t,
expr1, tag1 >
, matrix_expression< value_t,
expr2, tag2 >, op::mul > 
mul (const matrix_expression< value_t, expr1, tag1 > &left, const matrix_expression< value_t, expr2, tag2 > &right)
 Binary element-wise multiplication operation.
template<typename value_t , typename expr1 , typename tag1 , typename shape1 , typename expr2 , typename tag2 , typename shape2 >
const binary
< shaped_expression< value_t,
expr1, tag1, shape1 >
, shaped_expression< value_t,
expr2, tag2, shape2 >, op::mul > 
mul (const shaped_expression< value_t, expr1, tag1, shape1 > &left, const shaped_expression< value_t, expr2, tag2, shape2 > &right)
 Binary element-wise multiplication operation.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
const binary
< matrix_expression< value_t,
expr1, tag1 >
, matrix_expression< value_t,
expr2, tag2 >, op::div > 
div (const matrix_expression< value_t, expr1, tag1 > &left, const matrix_expression< value_t, expr2, tag2 > &right)
 Binary element-wise multiplication operation.
template<typename value_t , typename expr1 , typename tag1 , typename shape1 , typename expr2 , typename tag2 , typename shape2 >
const binary
< shaped_expression< value_t,
expr1, tag1, shape1 >
, shaped_expression< value_t,
expr2, tag2, shape2 >, op::div > 
div (const shaped_expression< value_t, expr1, tag1, shape1 > &left, const shaped_expression< value_t, expr2, tag2, shape2 > &right)
 Binary element-wise multiplication operation.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
product< matrix_expression
< value_t, expr1, tag1 >
, matrix_expression< value_t,
expr2, tag2 > > 
operator* (const matrix_expression< value_t, expr1, tag1 > &left, const matrix_expression< value_t, expr2, tag2 > &right)
 Binary matrix multiplication operator.
template<typename value_t , typename expr1 , typename tag1 , typename shape1 , typename expr2 , typename tag2 , typename shape2 >
product< shaped_expression
< value_t, expr1, tag1, shape1 >
, shaped_expression< value_t,
expr2, tag2, shape2 > > 
operator* (const shaped_expression< value_t, expr1, tag1, shape1 > &left, const shaped_expression< value_t, expr2, tag2, shape2 > &right)
 Binary matrix multiplication operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
product< matrix_expression
< value_t, expr1, tag1 >
, vector_expression< value_t,
expr2, tag2 > > 
operator* (const matrix_expression< value_t, expr1, tag1 > &left, const vector_expression< value_t, expr2, tag2, orientation::column > &right)
 Binary matrix-vector multiplication operator.
template<typename value_t , typename expr1 , typename tag1 , typename shape , typename expr2 , typename tag2 >
product< shaped_expression
< value_t, expr1, tag1, shape >
, vector_expression< value_t,
expr2, tag2 > > 
operator* (const shaped_expression< value_t, expr1, tag1, shape > &left, const vector_expression< value_t, expr2, tag2, orientation::column > &right)
 Binary matrix-vector multiplication operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
product< matrix_expression
< value_t, expr1, tag1 >
, vector_expression< value_t,
expr2, tag2 > > 
map (const matrix_expression< value_t, expr1, tag1 > &linear_map, const vector_expression< value_t, expr2, tag2 > &v)
 Transforms a vector using provided transformation map.
template<typename value_t , typename expr1 , typename tag1 , typename shape , typename expr2 , typename tag2 >
product< shaped_expression
< value_t, expr1, tag1, shape >
, vector_expression< value_t,
expr2, tag2 > > 
map (const shaped_expression< value_t, expr1, tag1, shape > &linear_map, const vector_expression< value_t, expr2, tag2 > &v)
 Transforms a vector using provided transformation map.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator+= (matrix_expression< value_t, expr1, tag::storage > &left, const matrix_expression< value_t, expr2, tag2 > &right)
 Matrix addition assignment operator.
template<typename value_t , typename expr1 , typename shape , typename expr2 , typename tag2 >
expr1 & operator+= (shaped_expression< value_t, expr1, tag::storage, shape > &left, const shaped_expression< value_t, expr2, tag2, shape > &right)
 Matrix addition assignment operator.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator-= (matrix_expression< value_t, expr1, tag::storage > &left, const matrix_expression< value_t, expr2, tag2 > &right)
 Matrix subtraction assignment operator.
template<typename value_t , typename expr1 , typename shape , typename expr2 , typename tag2 >
expr1 & operator-= (shaped_expression< value_t, expr1, tag::storage, shape > &left, const shaped_expression< value_t, expr2, tag2, shape > &right)
 Matrix subtraction assignment operator.
template<typename value_t , typename expr_t >
expr_t & operator*= (matrix_expression< value_t, expr_t, tag::storage > &left, const value_t &right)
 Matrix multiplication assignment operator.
template<typename value_t , typename expr_t , typename shape >
expr_t & operator*= (shaped_expression< value_t, expr_t, tag::storage, shape > &left, const value_t &right)
 Matrix multiplication assignment operator.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator*= (matrix_expression< value_t, expr1, tag::storage > &left, const matrix_expression< value_t, expr2, tag2 > &right)
 Matrix multiplication assignment operator.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator*= (shaped_expression< value_t, expr1, tag::storage, lower_triangular > &left, const shaped_expression< value_t, expr2, tag2, lower_triangular > &right)
 Matrix multiplication assignment operator.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator*= (shaped_expression< value_t, expr1, tag::storage, upper_triangular > &left, const shaped_expression< value_t, expr2, tag2, upper_triangular > &right)
 Matrix multiplication assignment operator.
Vector operations
template<template< typename, typename > class op, typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
op< value_t, value_t >::result_type accumulate (const vector_expression< value_t, expr1, tag1 > &a, const vector_expression< value_t, expr2, tag2 > &b)
 Accumulates combined values of two vectors.
template<template< typename, typename > class op_t, typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
op_t< value_t, value_t >
::result_type 
accumulate_skip_zeros (const vector_expression< value_t, expr1, tag1 > &a, const vector_expression< value_t, expr2, tag2 > &b)
 Accumulates combined values of two vectors.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
util::mul_conj< value_t,
value_t >::result_type 
dot_product (const vector_expression< value_t, expr1, tag1 > &v1, const vector_expression< value_t, expr2, tag2 > &v2)
 Dot product is a sum of products of corresponding elements of first vector and conjugated elements of the second one:
template<template< typename > class op, typename value_t , typename expr_t , typename tag >
op< value_t >::result_type accumulate (const vector_expression< value_t, expr_t, tag > &a)
 Accumulates modified values of a vector.
template<template< typename > class op_t, typename value_t , typename expr_t , typename tag >
op_t< value_t >::result_type accumulate_skip_zeros (const vector_expression< value_t, expr_t, tag > &a)
 Accumulates combined values of two vectors.
template<typename value_t , typename expr_t , typename tag >
value_t sqrnorm (const vector_expression< value_t, expr_t, tag > &v)
 Returns squared Euclidean norm of a vector.
template<typename value_t , typename expr_t , typename tag >
value_t norm (const vector_expression< value_t, expr_t, tag > &v)
 Returns Euclidean norm of a vector.
template<typename value_t , typename expr_t , typename tag >
const unary< vector_expression
< value_t, expr_t, tag >
, op::plus > 
operator+ (const vector_expression< value_t, expr_t, tag > &a)
 Unary plus operator.
template<typename value_t , typename expr_t , typename tag >
const unary< vector_expression
< value_t, expr_t, tag >
, op::minus > 
operator- (const vector_expression< value_t, expr_t, tag > &a)
 Unary minus operator.
template<typename value_t , typename expr_t , typename tag >
const unary< vector_expression
< value_t, expr_t, tag >
, op::conj > 
conj (const vector_expression< value_t, expr_t, tag > &a)
 Returns conjugated vector.
template<typename value_t , typename expr_t , typename tag >
const scaled
< vector_expression< value_t,
expr_t, tag > > 
operator* (const vector_expression< value_t, expr_t, tag > &a, const typename expr_t::value_type &s)
 Binary multiplication operator.
template<typename value_t , typename expr_t , typename tag >
const scaled
< vector_expression< value_t,
expr_t, tag > > 
operator* (const typename expr_t::value_type &s, const vector_expression< value_t, expr_t, tag > &a)
 Binary multiplication operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
const binary
< vector_expression< value_t,
expr1, tag1 >
, vector_expression< value_t,
expr2, tag2 >, op::add > 
operator+ (const vector_expression< value_t, expr1, tag1 > &left, const vector_expression< value_t, expr2, tag2 > &right)
 Binary addition operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
const binary
< vector_expression< value_t,
expr1, tag1 >
, vector_expression< value_t,
expr2, tag2 >, op::sub > 
operator- (const vector_expression< value_t, expr1, tag1 > &left, const vector_expression< value_t, expr2, tag2 > &right)
 Binary subtraction operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
const binary
< vector_expression< value_t,
expr1, tag1 >
, vector_expression< value_t,
expr2, tag2 >, op::mul > 
mul (const vector_expression< value_t, expr1, tag1 > &left, const vector_expression< value_t, expr2, tag2 > &right)
 Binary element-wise multiplication operator.
template<typename value_t , typename expr1 , typename tag1 , typename expr2 , typename tag2 >
const binary
< vector_expression< value_t,
expr1, tag1 >
, vector_expression< value_t,
expr2, tag2 >, op::div > 
div (const vector_expression< value_t, expr1, tag1 > &left, const vector_expression< value_t, expr2, tag2 > &right)
 Binary element-wise division operator.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator+= (vector_expression< value_t, expr1, tag::storage > &left, const vector_expression< value_t, expr2, tag2 > &right)
 Vector addition assignment operator.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator+= (vector_expression< value_t, expr1, tag::reference > &left, const vector_expression< value_t, expr2, tag2 > &right)
 Vector addition assignment operator.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator-= (vector_expression< value_t, expr1, tag::storage > &left, const vector_expression< value_t, expr2, tag2 > &right)
 Vector subtraction assignment operator.
template<typename value_t , typename expr1 , typename expr2 , typename tag2 >
expr1 & operator-= (vector_expression< value_t, expr1, tag::reference > &left, const vector_expression< value_t, expr2, tag2 > &right)
 Vector subtraction assignment operator.
template<typename value_t , typename expr_t >
expr_t & operator*= (vector_expression< value_t, expr_t, tag::storage > &left, const value_t &right)
 Vector multiplication assignment operator.
template<typename value_t , typename expr_t >
expr_t & operator*= (vector_expression< value_t, expr_t, tag::reference > &left, const value_t &right)
 Vector multiplication assignment operator.

Detailed Description

Contains definitions of matrix and vector template classes and other useful stuff.

Definition in file matrix.h.