add_to_diagonal
#
Header: <pressio/ops.hpp>
API#
namespace pressio { namespace ops{
template<class T1, class ScalarType>
void add_to_diagonal(T1 & operand, const ScalarType & value);
}} // end namespace pressio::ops
Description#
Adds the specified scalar
value
to each diagonal element ofoperand
T
must be a rank-2 Eigen matrixScalarType
must be convertible topressio::Traits<T>::scalar_type
Notes#
If the diagonal entries of
operand
are written, then all diagonal entries must already exist.See the ops homepage for a table of booleans to use when checking that
T1
has the correct type.