chsvlib
chsv helper source code

◆ RemoveColumns() [5/6]

derived_type RemoveColumns ( size_type  iColumnBegin,
size_type  iColumnEnd 
) const

Removes a specified range of columns from a copy of a matrix and returns it. .

Parameters
iColumnBeginAn index of the first column within the range of columns to be removed from the returned matrix.
iColumnEndAn index of the first column to the right of the range of columns to be removed. If such a column does not exist in the current matrix, the index can still be valid, if it holds a total number of columns within the matrix and, as such, satisfies the past-the-end condition, i.e. it is not dereferenceable but valid to address a range.
Returns
A new matrix which is a copy of the current matrix without the specified columns.
Exceptions
Chusov::Exceptions::InvalidParameterExceptionThe constraint \(iColumnBegin\leq iColumnEnd\) has been violated.
Chusov::Exceptions::OutOfRangeExceptionThe specified range \(\left[iColumnBegin, iColumnEnd\right)\) is not included or equal to the index range of columns of the current matrix, which is \(\left[0, Columns()\right)\).