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

◆ operator+=()

template<typename MatrixType >
template<typename T >
arena_matrix & stan::math::arena_matrix< MatrixType, require_eigen_sparse_base_t< MatrixType > >::operator+= ( T &&  other)
inline

Inplace operator +=

Note
Caution! Inplace operators assume that either
  1. The right hand side sparse matrix has the same sparsity pattern
  2. You only intend to add a scalar or dense matrix coefficients to the nonzero values of this. This is intended to be used within the reverse pass for accumulation of the adjoint and is built as such. Any other use case should be be sure that the above assumptions are satisfied.
Template Parameters
TA type derived from Eigen::SparseMatrixBase or Eigen::DenseMatrixBase or a Scalar
Parameters
othervalue to be added inplace to the matrix.

Definition at line 398 of file arena_matrix.hpp.