chsvlib
chsv helper source code

◆ Matrix() [8/16]

Matrix ( const Chusov::Memory::iterator_range< InputIterator > &  range,
const allocator_type alloc = allocator_type() 
)

Constructs a matrix from a range of matrices or matrix columns specified by an instantiation of the Chusov::Memory::iterator_range template for input iterators.

Template Parameters
InputIteratoris, at least, an InputIterator type of iterators specifying the range.
Parameters
rangeis the range of iterators. An iterator returned by
range.end()
must be reachable from
rang.begin()
through a finite number \(n\)of incrementations of the former. That is:
for (auto it = range.begin(); n-- > 0; ++it); it == range.end(); //true
. If this requirement is not met, the behaviour of the constructor is undefined. The behaviour is also undefined if the iterators correspond to columns of different matrices.
allocis a custom allocator which can be specified for the created matrix. By default, a default constructed allocator is passed.
Exceptions
Chusov::Exceptions::InvalidParameterExceptionSizes of the columns are mutually inconsistent.