chsvlib
chsv helper source code

◆ FixedMatrix() [8/15]

FixedMatrix ( input_iterator_t  itBegin,
input_iterator_t  itEnd,
array_interpretation_t  array_interpretation,
const allocator_type alloc = allocator_type() 
)

Constructs a fixed-size matrix from a specified set of elements given by a pair of iterators row-by-row. .

Template Parameters
input_iterator_tis a type of an iterator of, at least, input type. It is used for denoting a half-range of the sequence.
array_interpretation_tis a type of the array_interpretation parameter denoting a way to copy the iterated elements into the matrix.
Parameters
itBeginis an iterator denoting a start of the sequence and associated with the top-left element of the constructed matrix.
itEndis an iterator which is associated with a (pseudo) element past the end of the sequence of elements assigned to the matrix.
array_interpretationis an identifier for interpretation of the set of elements which can be set to either interpret_array_as_matrix_rows_set (to insert consequent elements of the set to the matrix row-by-row) or interpret_array_as_matrix_columns_set (to insert the elements column-by-column).
allocis a custom allocator which can be specified for the created matrix. By default, a default constructed allocator is used.
Exceptions
Chusov::Exceptions::InvalidParameterExceptionA size of the sequence to be assigned to matrix elements does not correspond to the matrix size given by its type.
Remarks
A size of the sequence given as the
[itBegin, itEnd)
half-interval must be equal to the product of ColumnCount and RowCount class template parameter.