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

Detailed Description

template<class T>
class gnsstk::MatrixColSlice< T >

an assignable single column slice of a matrix

Definition at line 59 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...
 
 MatrixColSlice ()
 default constructor More...
 
 MatrixColSlice (Matrix< T > &mat, size_t col)
 makes a slice of the column col from matrix mat. More...
 
 MatrixColSlice (Matrix< T > &mat, size_t col, const std::slice &s)
 
T & operator() (size_t i)
 returns the i'th element of the column, non-const More...
 
operator() (size_t i) const
 returns the i'th element of the column, const More...
 
T & operator() (size_t i, size_t j)
 returns the (i,j) element, non-const More...
 
operator() (size_t i, size_t j) const
 returns the (i,j) element, non-const More...
 
template<class V >
MatrixColSliceoperator= (const ConstMatrixBase< T, V > &x)
 assigns this column to x More...
 
template<class V >
MatrixColSliceoperator= (const ConstVectorBase< T, V > &x)
 assigns this column to x More...
 
MatrixColSliceoperator= (const std::valarray< T > &x)
 assigns this column to x More...
 
MatrixColSliceoperator= (const T *x)
 assigns this column to x More...
 
MatrixColSliceoperator= (const T x)
 assigns this column to x More...
 
T & operator[] (size_t i)
 returns the i'th element of the column, non-const More...
 
operator[] (size_t i) const
 returns the i'th element of the column, const 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 the slice More...
 

Private Attributes

size_t c
 the column this slice is for More...
 
Matrix< T > * m
 the matrix this slice refers to. More...
 
std::slice rSlice
 slice down the rows More...
 

Constructor & Destructor Documentation

◆ MatrixColSlice() [1/3]

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

default constructor

Definition at line 419 of file Matrix.hpp.

◆ MatrixColSlice() [2/3]

template<class T >
gnsstk::MatrixColSlice< T >::MatrixColSlice ( Matrix< T > &  mat,
size_t  col 
)
inline

makes a slice of the column col from matrix mat.

Definition at line 421 of file Matrix.hpp.

◆ MatrixColSlice() [3/3]

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

makes a slice of the column from the matrix using s to further slice the column.

Definition at line 428 of file Matrix.hpp.

Member Function Documentation

◆ cols()

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

returns the number of columns in the slice

Definition at line 477 of file Matrix.hpp.

◆ colSize()

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

returns the number of columns in this slice

Definition at line 488 of file Matrix.hpp.

◆ colStart()

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

returns the starting row in the base matrix of this slice

Definition at line 490 of file Matrix.hpp.

◆ colStride()

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

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

Definition at line 492 of file Matrix.hpp.

◆ operator()() [1/4]

template<class T >
T& gnsstk::MatrixColSlice< T >::operator() ( size_t  i)
inline

returns the i'th element of the column, non-const

Definition at line 458 of file Matrix.hpp.

◆ operator()() [2/4]

template<class T >
T gnsstk::MatrixColSlice< T >::operator() ( size_t  i) const
inline

returns the i'th element of the column, const

Definition at line 464 of file Matrix.hpp.

◆ operator()() [3/4]

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

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

Definition at line 468 of file Matrix.hpp.

◆ operator()() [4/4]

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

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

Definition at line 471 of file Matrix.hpp.

◆ operator=() [1/5]

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

assigns this column to x

Definition at line 437 of file Matrix.hpp.

◆ operator=() [2/5]

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

assigns this column to x

Definition at line 442 of file Matrix.hpp.

◆ operator=() [3/5]

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

assigns this column to x

Definition at line 445 of file Matrix.hpp.

◆ operator=() [4/5]

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

assigns this column to x

Definition at line 451 of file Matrix.hpp.

◆ operator=() [5/5]

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

assigns this column to x

Definition at line 448 of file Matrix.hpp.

◆ operator[]() [1/2]

template<class T >
T& gnsstk::MatrixColSlice< T >::operator[] ( size_t  i)
inline

returns the i'th element of the column, non-const

Definition at line 455 of file Matrix.hpp.

◆ operator[]() [2/2]

template<class T >
T gnsstk::MatrixColSlice< T >::operator[] ( size_t  i) const
inline

returns the i'th element of the column, const

Definition at line 461 of file Matrix.hpp.

◆ rows()

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

returns the number of rows in the slice

Definition at line 475 of file Matrix.hpp.

◆ rowSize()

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

returns the number of rows in this slice

Definition at line 482 of file Matrix.hpp.

◆ rowStart()

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

returns the starting row in the base matrix of this slice

Definition at line 484 of file Matrix.hpp.

◆ rowStride()

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

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

Definition at line 486 of file Matrix.hpp.

◆ size()

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

returns the size of the slice

Definition at line 479 of file Matrix.hpp.

Member Data Documentation

◆ c

template<class T >
size_t gnsstk::MatrixColSlice< T >::c
private

the column this slice is for

Definition at line 498 of file Matrix.hpp.

◆ m

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

the matrix this slice refers to.

Definition at line 496 of file Matrix.hpp.

◆ rSlice

template<class T >
std::slice gnsstk::MatrixColSlice< T >::rSlice
private

slice down the rows

Definition at line 500 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