chsvlib
chsv helper source code

◆ neg_matrix_copy()

void Chusov::Math::neg_matrix_copy ( const ValueType *restrict  input_column_matrix,
std::size_t  columns,
std::size_t  rows,
ValueType *restrict  result 
)

Computes arithmetic negation of a matrix and assigns the result to a different matrix.

Template Parameters
ValueTypeA type of a matrix element.
Parameters
[in]input_column_matrixA pointer addressing a two-dimensional array of elements which represent a matrix, of size columns by rows elements, to negate.
columnsA number of columns in the source and destination matrices.
rowsA number of rows in the source and destination matrices.
[in,out]resultA pointer to a matrix which accepts the result of the operation. The elements of the result are copy-assigned to. The buffer must not overlap with input_column_matrix.
Exceptions
Anyexceptions thrown from additive inversion or move-assignment of ValueType elements.

The elements of the resulting matrix are sequentially copy-assigned to the elements of the two-dimensional array pointed to by result. In order to construct elements of the result in an uninitialized buffer, use neg_matrix_construct. In order to perform negation in place, use neg_matrix_inplace.