Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ sum() [2/7]

template<typename T , require_eigen_vt< is_fvar, T > * = nullptr>
value_type_t< T > stan::math::sum ( const T &  m)
inline

Return the sum of the entries of the specified matrix.

Returns the sum of the coefficients of the specified Eigen Matrix, Array or expression of complex type.

Returns the sum of the coefficients of the specified Eigen Matrix, Array or expression.

Calculates sum of given kernel generator expression.

Template Parameters
Ttype of the matrix
Parameters
mMatrix.
Returns
Sum of matrix entries.
Template Parameters
Ttype of the expression
Parameters
mexpression to sum
Returns
sum of given expression
Template Parameters
TType of argument
Parameters
margument
Returns
Sum of coefficients of argument.

Definition at line 45 of file sum.hpp.