Functions
Fn_sum

Functions

template<typename T1 >
arma_inline const Op< T1, op_sumsum (const Base< typename T1::elem_type, T1 > &X, const uword dim=0)
 Delayed sum of elements of a matrix along a specified dimension (either rows or columns). The result is stored in a dense matrix that has either one column or one row. For dim = 0, find the sum of each column. For dim = 1, find the sum of each row. The default is dim = 0. NOTE: this function works differently than in Matlab/Octave.
template<typename eT >
arma_warn_unused eT sum (const Row< eT > &X)
 Immediate 'sum all values' operation for a row vector.
template<typename eT >
arma_warn_unused eT sum (const Col< eT > &X)
 Immediate 'sum all values' operation for a column vector.
template<typename T1 >
arma_warn_unused T1::elem_type sum (const Op< T1, op_sum > &in)
 Immediate 'sum all values' operation, invoked, for example, by: sum(sum(A))
template<typename T1 >
arma_inline const Op< Op< T1,
op_sum >, op_sum
sum (const Op< T1, op_sum > &in, const uword dim)
template<typename eT >
arma_warn_unused eT sum (const subview_row< eT > &X)
 sum all values of a subview_row
template<typename eT >
arma_warn_unused eT sum (const subview_col< eT > &X)
 sum all values of a subview_col
template<typename eT >
arma_warn_unused eT sum (const diagview< eT > &X)
 sum all values of a diagview
template<typename eT , typename T1 >
arma_warn_unused eT sum (const subview_elem1< eT, T1 > &A)

Function Documentation

template<typename T1 >
arma_inline const Op<T1, op_sum> sum ( const Base< typename T1::elem_type, T1 > &  X,
const uword  dim = 0 
)

Delayed sum of elements of a matrix along a specified dimension (either rows or columns). The result is stored in a dense matrix that has either one column or one row. For dim = 0, find the sum of each column. For dim = 1, find the sum of each row. The default is dim = 0. NOTE: this function works differently than in Matlab/Octave.

Definition at line 29 of file fn_sum.hpp.

template<typename eT >
arma_warn_unused eT sum ( const Row< eT > &  X) [inline]

Immediate 'sum all values' operation for a row vector.

Definition at line 43 of file fn_sum.hpp.

template<typename eT >
arma_warn_unused eT sum ( const Col< eT > &  X) [inline]

Immediate 'sum all values' operation for a column vector.

Definition at line 58 of file fn_sum.hpp.

template<typename T1 >
arma_warn_unused T1::elem_type sum ( const Op< T1, op_sum > &  in) [inline]

Immediate 'sum all values' operation, invoked, for example, by: sum(sum(A))

Definition at line 75 of file fn_sum.hpp.

template<typename T1 >
arma_inline const Op<Op<T1, op_sum>, op_sum> sum ( const Op< T1, op_sum > &  in,
const uword  dim 
)

Definition at line 88 of file fn_sum.hpp.

template<typename eT >
arma_warn_unused eT sum ( const subview_row< eT > &  X) [inline]

sum all values of a subview_row

Definition at line 102 of file fn_sum.hpp.

template<typename eT >
arma_warn_unused eT sum ( const subview_col< eT > &  X) [inline]

sum all values of a subview_col

Definition at line 116 of file fn_sum.hpp.

template<typename eT >
arma_warn_unused eT sum ( const diagview< eT > &  X) [inline]

sum all values of a diagview

Definition at line 130 of file fn_sum.hpp.

template<typename eT , typename T1 >
arma_warn_unused eT sum ( const subview_elem1< eT, T1 > &  A) [inline]

Definition at line 143 of file fn_sum.hpp.



armadillo_matrix
Author(s): Conrad Sanderson - NICTA (www.nicta.com.au), (Wrapper by Sjoerd van den Dries)
autogenerated on Tue Jan 7 2014 11:42:07