Constructs a diagonal column-major matrix in a specified buffer.
- Template Parameters
-
| ValueType | A type of a matrix element. |
- Parameters
-
| [out] | column_matrix | A buffer which receives the constructed matrix. The array must be sufficient to hold columns * rows elements of the type ValueType. |
| columns | A number of columns in the matrix to create. |
| rows | A number of rows in the matrix to create. |
| diag | A value copy-constructed in places of the main diagonal of column_matrix. |
- Exceptions
-
| Any | exception thrown by the default, copy or move constructors of ValueType. |
Unlike construct_diagonal_matrix, this function performs inplace coopy-construction rather than copy-assignment of the elements.