chsvlib
chsv helper source code

◆ sub_matrix_inplace_rev()

void Chusov::Math::sub_matrix_inplace_rev ( const ValueType *  minuend_column_matrix,
ValueType *  subtrahend_column_matrix,
std::size_t  columns,
std::size_t  rows 
)

Performs a subtraction of two matrices using two-dimensional array representation and writes the difference in place of the subtrahend.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in]minuend_column_matrixA pointer to a buffer holding the minuend matrix of columns by rows elements to subtract from.
[in,out]subtrahend_column_matrixA pointer to a buffer, that on input contains elements of the subtrahend which is a matrix of columns by rows elements. On output the buffer contains the result of the subtraction.
columnsA number of columns in the matrices to subtract.
rowsA number of rows in the matrices to subtract.
Exceptions
Anyexceptions that originate from subtraction or move-assignment of ValueType scalars.

To subtract matrices writing the difference in place of the minuend rather than the subtrahend, use sub_matrix_inplace. To write the difference to a buffer different from buffers of both of the operands, use either sub_matrix_copy, to replace some other existing matrix with the difference, or sub_matrix_construct to construct the result of addition in an uninitialized buffer.