chsvlib
chsv helper source code

◆ FixedMatrix() [13/15]

FixedMatrix ( const std::vector< value_t, alloc_t > &  v,
const allocator_type alloc = allocator_type() 
)

Creates a matrix from a set of its elements given by a vector object.

Template Parameters
value_tis a type of elements of the input vector to be explicitly converted into value_type.
alloc_tis a type of an allocator object used by the vector specified as the input parameter.
Parameters
vis an [std::vector]<value_t,alloc_t> of elements to be explicitly converted to elements of the value_type type and stored within the internal storage of the matrix created with respect to other parameters. The input vector must contain at least a number of elements that is a product of the ColumnCount and the RowCount template parameters.
allocis an allocator object used to manage storage of the matrix elements.
Exceptions
Chusov::Exceptions::InvalidParameterExceptionThe cColumns and/or cRows are not equal to the ColumnCount and RowCount template instantiation parameters, or a size of the vector is not equal to a product of cColumns and cRows.