chsvlib
chsv helper source code

◆ Matrix() [11/16]

Matrix ( value_t *  pVector,
std::size_t  cColumns,
std::size_t  cRows,
interpretation_t  vector_interpretation,
const allocator_type alloc = allocator_type() 
)

Creates a matrix from a vector of data pointed to by parameters of the constructor. The data is a set of adjacent matrix elements which are treated either as a set of rows or as a set of columns depending on in interpretation mark.

Template Parameters
value_tis a type of an array element to be explicitly converted into value_type.
interpretation_tis a type of the array_interpretation parameter denoting a way to copy the data elements into the matrix.
Parameters
pVectoris a pointer to memory with elements of the created matrix. Every element of the vector is copied to the internal storage with respect to values of other parameters. An amount of elements read from the buffer is determined as a multiple of a number of columns and a number of rows, both of which are specified parametrically.
cColumnsis a number of columns within the created matrix.
cRowsis a number of rows within the created matrix.
vector_interpretationis an interpretation mark which is set to either interpret_array_as_matrix_rows_set to specify that the input data is a set of adjacent rows, or interpret_array_as_matrix_columns_set to interpret the data as a set of adjacent columns.
allocis an allocator object used to manage storage of the matrix elements.