chsvlib
chsv helper source code

◆ Matrix() [14/16]

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

Creates a matrix from a vector of raw data pointed to by parameters of the constructor.

Template Parameters
value_tis a type of an array element to be explicitly converted into value_type.
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. It is assumed that input buffer stores elements row-by-row, that is the vector can be considered as a vector of matrix rows. 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.
allocis an allocator object used to manage storage of the matrix elements.