Public Member Functions | Private Attributes | List of all members
gnsstk::MatrixRowSlice< T > Class Template Reference

Detailed Description

template<class T>
class gnsstk::MatrixRowSlice< T >

an assignable single row slice of a matrix

Definition at line 57 of file Matrix.hpp.

#include <Matrix.hpp>

Public Member Functions

size_t cols () const
 returns the number of columns in the row 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...
 
 MatrixRowSlice ()
 default constructor More...
 
 MatrixRowSlice (Matrix< T > &mat, size_t row)
 makes a slice of row row from the matrix. More...
 
 MatrixRowSlice (Matrix< T > &mat, size_t row, const std::slice &s)
 makes a slice of row row from the matrix, slicing it by s. More...
 
T & operator() (size_t i, size_t j)
 returns the (i,j) element of the slice, non-const More...
 
operator() (size_t i, size_t j) const
 returns the (i,j) element of the slice, const More...
 
T & operator() (size_t j)
 returns the j'th element of the slice, non-const More...
 
operator() (size_t j) const
 returns the j'th element of the slice, const More...
 
template<class V >
MatrixRowSliceoperator= (const ConstMatrixBase< T, V > &x)
 assigns this row to x. More...
 
template<class V >
MatrixRowSliceoperator= (const ConstVectorBase< T, V > &x)
 assigns this row to x. More...
 
MatrixRowSliceoperator= (const std::valarray< T > &x)
 assigns this row to x. More...
 
MatrixRowSliceoperator= (const T *x)
 assigns this row to x. More...
 
MatrixRowSliceoperator= (const T x)
 assigns this row to x. More...
 
T & operator[] (size_t j)
 returns the j'th element of the slice, non-const More...
 
operator[] (size_t j) const
 returns the j'th element of the slice, const More...
 
size_t rows () const
 returns the number of rows in the row 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 the slice More...
 

Private Attributes

std::slice cSlice
 the column slice of the row. More...
 
Matrix< T > * m
 the matrix this slice refers to. More...
 
size_t r
 the row of the slice More...
 

Constructor & Destructor Documentation

◆ MatrixRowSlice() [1/3]

template<class T >
gnsstk::MatrixRowSlice< T >::MatrixRowSlice ( )
inline

default constructor

Definition at line 578 of file Matrix.hpp.

◆ MatrixRowSlice() [2/3]

template<class T >
gnsstk::MatrixRowSlice< T >::MatrixRowSlice ( Matrix< T > &  mat,
size_t  row 
)
inline

makes a slice of row row from the matrix.

Definition at line 582 of file Matrix.hpp.

◆ MatrixRowSlice() [3/3]

template<class T >
gnsstk::MatrixRowSlice< T >::MatrixRowSlice ( Matrix< T > &  mat,
size_t  row,
const std::slice &  s 
)
inline

makes a slice of row row from the matrix, slicing it by s.

Definition at line 587 of file Matrix.hpp.

Member Function Documentation

◆ cols()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::cols ( ) const
inline

returns the number of columns in the row slice

Definition at line 635 of file Matrix.hpp.

◆ colSize()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::colSize ( ) const
inline

returns the number of columns in this slice

Definition at line 646 of file Matrix.hpp.

◆ colStart()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::colStart ( ) const
inline

returns the starting row in the base matrix of this slice

Definition at line 648 of file Matrix.hpp.

◆ colStride()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::colStride ( ) const
inline

returns the number of elements between the i'th and i+1'th row

Definition at line 650 of file Matrix.hpp.

◆ operator()() [1/4]

template<class T >
T& gnsstk::MatrixRowSlice< T >::operator() ( size_t  i,
size_t  j 
)
inline

returns the (i,j) element of the slice, non-const

Definition at line 626 of file Matrix.hpp.

◆ operator()() [2/4]

template<class T >
T gnsstk::MatrixRowSlice< T >::operator() ( size_t  i,
size_t  j 
) const
inline

returns the (i,j) element of the slice, const

Definition at line 629 of file Matrix.hpp.

◆ operator()() [3/4]

template<class T >
T& gnsstk::MatrixRowSlice< T >::operator() ( size_t  j)
inline

returns the j'th element of the slice, non-const

Definition at line 617 of file Matrix.hpp.

◆ operator()() [4/4]

template<class T >
T gnsstk::MatrixRowSlice< T >::operator() ( size_t  j) const
inline

returns the j'th element of the slice, const

Definition at line 623 of file Matrix.hpp.

◆ operator=() [1/5]

template<class T >
template<class V >
MatrixRowSlice& gnsstk::MatrixRowSlice< T >::operator= ( const ConstMatrixBase< T, V > &  x)
inline

assigns this row to x.

Definition at line 597 of file Matrix.hpp.

◆ operator=() [2/5]

template<class T >
template<class V >
MatrixRowSlice& gnsstk::MatrixRowSlice< T >::operator= ( const ConstVectorBase< T, V > &  x)
inline

assigns this row to x.

Definition at line 601 of file Matrix.hpp.

◆ operator=() [3/5]

template<class T >
MatrixRowSlice& gnsstk::MatrixRowSlice< T >::operator= ( const std::valarray< T > &  x)
inline

assigns this row to x.

Definition at line 604 of file Matrix.hpp.

◆ operator=() [4/5]

template<class T >
MatrixRowSlice& gnsstk::MatrixRowSlice< T >::operator= ( const T *  x)
inline

assigns this row to x.

Definition at line 610 of file Matrix.hpp.

◆ operator=() [5/5]

template<class T >
MatrixRowSlice& gnsstk::MatrixRowSlice< T >::operator= ( const x)
inline

assigns this row to x.

Definition at line 607 of file Matrix.hpp.

◆ operator[]() [1/2]

template<class T >
T& gnsstk::MatrixRowSlice< T >::operator[] ( size_t  j)
inline

returns the j'th element of the slice, non-const

Definition at line 614 of file Matrix.hpp.

◆ operator[]() [2/2]

template<class T >
T gnsstk::MatrixRowSlice< T >::operator[] ( size_t  j) const
inline

returns the j'th element of the slice, const

Definition at line 620 of file Matrix.hpp.

◆ rows()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::rows ( ) const
inline

returns the number of rows in the row slice

Definition at line 633 of file Matrix.hpp.

◆ rowSize()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::rowSize ( ) const
inline

returns the number of rows in this slice

Definition at line 640 of file Matrix.hpp.

◆ rowStart()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::rowStart ( ) const
inline

returns the starting row in the base matrix of this slice

Definition at line 642 of file Matrix.hpp.

◆ rowStride()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::rowStride ( ) const
inline

returns the number of elements between the i'th and i+1'th row

Definition at line 644 of file Matrix.hpp.

◆ size()

template<class T >
size_t gnsstk::MatrixRowSlice< T >::size ( ) const
inline

returns the size of the slice

Definition at line 637 of file Matrix.hpp.

Member Data Documentation

◆ cSlice

template<class T >
std::slice gnsstk::MatrixRowSlice< T >::cSlice
private

the column slice of the row.

Definition at line 658 of file Matrix.hpp.

◆ m

template<class T >
Matrix<T>* gnsstk::MatrixRowSlice< T >::m
private

the matrix this slice refers to.

Definition at line 654 of file Matrix.hpp.

◆ r

template<class T >
size_t gnsstk::MatrixRowSlice< T >::r
private

the row of the slice

Definition at line 656 of file Matrix.hpp.


The documentation for this class was generated from the following file:


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45