chsvlib
chsv helper source code

◆ AugmentMe() [4/4]

derived_type& AugmentMe ( InputIterator  itBegin,
InputIterator  itEnd 
)

Adds a specified range of matrix columns to the right side of the current matrix.

Template Parameters
InputIteratorIs a type of iterators itBegin and itEnd which specify the range of columns. It can be a reverse iterator type which causes corresponding columns to be added to the matrix in reverse order.
Parameters
itBeginis at least an input iterator specifying the first column to be added to the matrix.
itEndis at least an input iterator which specifies the first (pseudo) column to the right of the range of columns to be added to the matrix.
Returns
A reference to *this.
Remarks
The iterated columns are added to the right of the matrix starting from itBegin and ending with itEnd (the latter is excluded). This means that specifying reverse iterators would cause the columns to be augmented in reverse order. This also means that itEnd must be reachable from itBegin through a finite number of valid incrementations of the latter, i.e. for random access iterators the expression \(itBegin\leq itEnd\) must be true. The behaviour is undefined otherwise.
Both the current matrix and the iterator range can be empty. If the matrix is empty, the elements are simply assigned to appropriately constructed new columns of the matrix. If the range is empty, the current matrix is left unchanged.
Exceptions
Chusov::Exceptions::InvalidParameterExceptionA number of rows in the columns mismatches a number of rows in the matrix, except for the case when the iterator range is empty and/or when the matrix is empty.
See also
make_augmentation_matrix