An assignable slice of a matrix.
Definition at line 249 of file Matrix.hpp.
#include <Matrix.hpp>
Public Member Functions | |
size_t | cols () const |
returns the number of columns in the slice More... | |
size_t | colSize () const |
returns the number of columns in this slice More... | |
size_t | colStart () const |
returns the starting row in the base matrix of this slice More... | |
size_t | colStride () const |
returns the number of elements between the i'th and i+1'th row More... | |
MatrixSlice () | |
default constructor More... | |
MatrixSlice (Matrix< T > &mat) | |
Makes a slice of the whole matrix. More... | |
MatrixSlice (Matrix< T > &mat, const std::slice &rowSlice, const std::slice &colSlice) | |
Makes a partial slice of a matrix. More... | |
MatrixSlice (Matrix< T > &mat, size_t topRow, size_t topCol, size_t numRows, size_t numCols) | |
Submatrix slice. More... | |
T & | operator() (size_t i, size_t j) |
returns the (i,j) element of the slice. More... | |
T | operator() (size_t i, size_t j) const |
returns the (i,j) element of the slice, const version. More... | |
template<class V > | |
MatrixSlice & | operator= (const ConstMatrixBase< T, V > &x) |
Copies from x to (*this). More... | |
template<class V > | |
MatrixSlice & | operator= (const ConstVectorBase< T, V > &x) |
Copies from x to (*this). More... | |
MatrixSlice & | operator= (const std::valarray< T > &x) |
Copies from x to (*this). More... | |
MatrixSlice & | operator= (const T *x) |
Copies from x to (*this). More... | |
MatrixSlice & | operator= (const T x) |
Copies from x to (*this). More... | |
size_t | rows () const |
returns the number of rows in the slice More... | |
size_t | rowSize () const |
returns the number of rows in this slice More... | |
size_t | rowStart () const |
returns the starting row in the base matrix of this slice More... | |
size_t | rowStride () const |
returns the number of elements between the i'th and i+1'th row More... | |
size_t | size () const |
returns the size of this slice More... | |
![]() | |
RefMatrixSliceBase () | |
![]() | |
MatrixSlice< T > & | assignFrom (const ConstMatrixBase< T, E > &x) |
MatrixSlice< T > & | assignFrom (const ConstVectorBase< T, E > &x) |
MatrixSlice< T > & | assignFrom (const std::valarray< T > &x) |
MatrixSlice< T > & | assignFrom (const T *x) |
MatrixSlice< T > & | assignFrom (T x) |
size_t | cols () const |
returns the number of columns in the matrix More... | |
T & | operator() (size_t i, size_t j) |
returns a reference to the (i,j) element of the matrix. More... | |
MatrixSlice< T > & | operator*= (const T x) |
multiplies each element in this matrix by x. More... | |
MatrixSlice< T > & | operator+= (const ConstMatrixBase< T, E > &x) |
MatrixSlice< T > & | operator+= (const ConstVectorBase< T, E > &x) |
MatrixSlice< T > & | operator+= (const std::valarray< T > &x) |
MatrixSlice< T > & | operator+= (const T *x) |
MatrixSlice< T > & | operator+= (T x) |
const MatrixSlice< T > | operator- () |
unary minus: multiplies each element in this matrix by -1. More... | |
MatrixSlice< T > & | operator-= (const ConstMatrixBase< T, E > &x) |
MatrixSlice< T > & | operator-= (const ConstVectorBase< T, E > &x) |
MatrixSlice< T > & | operator-= (const std::valarray< T > &x) |
MatrixSlice< T > & | operator-= (const T *x) |
MatrixSlice< T > & | operator-= (T x) |
MatrixSlice< T > & | operator/= (const T x) |
divides each element in this matrix by x. More... | |
RefMatrixBase () | |
default constructor More... | |
size_t | rows () const |
returns the number of rows in the matrix More... | |
size_t | size () const |
returns the rows()*cols() size of the matrix More... | |
MatrixSlice< T > & | swapCols (size_t col1, size_t col2) |
MatrixSlice< T > & | swapRows (size_t row1, size_t row2) |
MatrixSlice< T > & | zeroize () |
MatrixSlice< T > & | zeroizeCol (size_t c) |
MatrixSlice< T > & | zeroizeRow (size_t r) |
virtual | ~RefMatrixBase () |
![]() | |
Vector< T > | colCopy (size_t c, size_t r=0) const |
size_t | cols () const |
the number of columns in the matrix More... | |
ConstMatrixBase () | |
default constructor More... | |
Vector< T > | diagCopy (void) const |
bool | isDiagonal () const |
returns true if this is a diagonal matrix More... | |
bool | isLT () const |
returns true if this is a lower triangular matrix. More... | |
bool | isSquare () const |
returns true if this is a square matrix (false for a null matrix). More... | |
bool | isSymmetric () const |
bool | isUT () const |
returns true if this is an upper triangular matrix. More... | |
T | operator() (size_t i, size_t j) const |
Vector< T > | rowCopy (size_t r, size_t c=0) const |
size_t | rows () const |
the number of rows in the matrix More... | |
size_t | size () const |
the rows()*cols() size of the matrix. More... | |
virtual | ~ConstMatrixBase () |
Private Attributes | |
std::slice | cSlice |
a column slice More... | |
Matrix< T > * | m |
The matrix this slice refers to. More... | |
std::slice | rSlice |
a row slice More... | |
size_t | s |
the overall size More... | |
Additional Inherited Members | |
![]() | |
void | matSliceCheck (size_t sourceRowSize, size_t sourceColSize) const |
![]() | |
T | constMatrixRef (size_t i, size_t j) const |
|
inline |
default constructor
Definition at line 253 of file Matrix.hpp.
|
inline |
Makes a slice of the whole matrix.
Definition at line 258 of file Matrix.hpp.
|
inline |
Makes a partial slice of a matrix.
Definition at line 266 of file Matrix.hpp.
|
inline |
Submatrix slice.
Definition at line 275 of file Matrix.hpp.
|
inline |
returns the number of columns in the slice
Definition at line 307 of file Matrix.hpp.
|
inline |
returns the number of columns in this slice
Definition at line 327 of file Matrix.hpp.
|
inline |
returns the starting row in the base matrix of this slice
Definition at line 329 of file Matrix.hpp.
|
inline |
returns the number of elements between the i'th and i+1'th row
Definition at line 331 of file Matrix.hpp.
|
inline |
returns the (i,j) element of the slice.
Definition at line 311 of file Matrix.hpp.
|
inline |
returns the (i,j) element of the slice, const version.
Definition at line 315 of file Matrix.hpp.
|
inline |
Copies from x to (*this).
Definition at line 286 of file Matrix.hpp.
|
inline |
Copies from x to (*this).
Definition at line 291 of file Matrix.hpp.
|
inline |
Copies from x to (*this).
Definition at line 295 of file Matrix.hpp.
|
inline |
Copies from x to (*this).
Definition at line 301 of file Matrix.hpp.
|
inline |
Copies from x to (*this).
Definition at line 298 of file Matrix.hpp.
|
inline |
returns the number of rows in the slice
Definition at line 309 of file Matrix.hpp.
|
inline |
returns the number of rows in this slice
Definition at line 321 of file Matrix.hpp.
|
inline |
returns the starting row in the base matrix of this slice
Definition at line 323 of file Matrix.hpp.
|
inline |
returns the number of elements between the i'th and i+1'th row
Definition at line 325 of file Matrix.hpp.
|
inline |
returns the size of this slice
Definition at line 305 of file Matrix.hpp.
|
private |
a column slice
Definition at line 337 of file Matrix.hpp.
|
private |
The matrix this slice refers to.
Definition at line 335 of file Matrix.hpp.
|
private |
a row slice
Definition at line 336 of file Matrix.hpp.
|
private |
the overall size
Definition at line 338 of file Matrix.hpp.