Computes arithmetic negation of a matrix and constructs the result in an uninitialized buffer.
- Template Parameters
-
ValueType | A type of a matrix element. |
- Parameters
-
[in] | input_column_matrix | A pointer addressing a two-dimensional array of elements which represents a matrix, of size columns by rows elements, to negate. |
| columns | A number of columns in the input and resulting matrices. |
| rows | A number of rows in the input and resulting matrices. |
[out] | result | A pointer to a buffer sufficient to hold the resulting columns by rows two-dimensional array of elements of the negation result. The elements of the resulting matrix are constructed in place of the respective elements in result . The buffer must not overlap with input_column_matrix. |
- Exceptions
-
Any | exceptions thrown from negation or move-construction of ValueType elements. |
The elements of the resulting matrix are constructed in place of the respective elements of the two-dimensional buffer pointed to by result
which is considered uninitialized. That is, no destruction or assignment of elements in result
takes place. In order to replace an existing matrix (different from input_column_matrix
) with the negation result, one should use neg_matrix_copy which performs assignment of elements rather than their construction. In order to replace the original matrix with its additive inverse, use neg_matrix_inplace.