chsvlib
chsv helper source code

◆ neg_matrix_inplace()

void Chusov::Math::neg_matrix_inplace ( ValueType *  column_matrix,
std::size_t  columns,
std::size_t  rows 
)

Performs an in-place negation of a matrix represented by a two-dimensional array.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in,out]column_matrixA pointer to a matrix of columns by rows elements to be replaced by their additive inversions.
columnsA number of columns in the matrix to negate.
rowsA number of rows in the matrix to negate.
Exceptions
Anyexceptions thrown from additive inversion or move-assignment of ValueType elements.

To replace a matrix with an additive inversion of some other matrix, use neg_matrix_copy. To construct an additive inversion of a matrix in some uninitialized memory space, use neg_matrix_construct.