Public Member Functions | List of all members
gnsstk::RefMatrixBase< T, BaseClass > Class Template Reference

Detailed Description

template<class T, class BaseClass>
class gnsstk::RefMatrixBase< T, BaseClass >

A matrix base class that allows assignment of the internal matrix. There is no operator[] for base matrix classes.

Definition at line 217 of file MatrixBase.hpp.

#include <MatrixBase.hpp>

Inheritance diagram for gnsstk::RefMatrixBase< T, BaseClass >:
Inheritance graph
[legend]

Public Member Functions

template<class E >
BaseClass & assignFrom (const ConstMatrixBase< T, E > &x)
 
template<class E >
BaseClass & assignFrom (const ConstVectorBase< T, E > &x)
 
BaseClass & assignFrom (const std::valarray< T > &x)
 
BaseClass & assignFrom (const T *x)
 
BaseClass & 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...
 
BaseClass & operator*= (const T x)
 multiplies each element in this matrix by x. More...
 
template<class E >
BaseClass & operator+= (const ConstMatrixBase< T, E > &x)
 
template<class E >
BaseClass & operator+= (const ConstVectorBase< T, E > &x)
 
BaseClass & operator+= (const std::valarray< T > &x)
 
BaseClass & operator+= (const T *x)
 
BaseClass & operator+= (T x)
 
const BaseClass operator- ()
 unary minus: multiplies each element in this matrix by -1. More...
 
template<class E >
BaseClass & operator-= (const ConstMatrixBase< T, E > &x)
 
template<class E >
BaseClass & operator-= (const ConstVectorBase< T, E > &x)
 
BaseClass & operator-= (const std::valarray< T > &x)
 
BaseClass & operator-= (const T *x)
 
BaseClass & operator-= (T x)
 
BaseClass & 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...
 
BaseClass & swapCols (size_t col1, size_t col2)
 
BaseClass & swapRows (size_t row1, size_t row2)
 
BaseClass & zeroize ()
 
BaseClass & zeroizeCol (size_t c)
 
BaseClass & zeroizeRow (size_t r)
 
virtual ~RefMatrixBase ()
 
- Public Member Functions inherited from gnsstk::ConstMatrixBase< T, BaseClass >
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...
 
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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from gnsstk::ConstMatrixBase< T, BaseClass >
constMatrixRef (size_t i, size_t j) const
 

Constructor & Destructor Documentation

◆ RefMatrixBase()

template<class T , class BaseClass >
gnsstk::RefMatrixBase< T, BaseClass >::RefMatrixBase ( )
inlineexplicit

default constructor

Definition at line 221 of file MatrixBase.hpp.

◆ ~RefMatrixBase()

template<class T , class BaseClass >
virtual gnsstk::RefMatrixBase< T, BaseClass >::~RefMatrixBase ( )
inlinevirtual

Definition at line 223 of file MatrixBase.hpp.

Member Function Documentation

◆ assignFrom() [1/5]

template<class T , class BaseClass >
template<class E >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::assignFrom ( const ConstMatrixBase< T, E > &  x)
inline

remember that operator= isn't inherited. use assignFrom in derived classes' copy constructors and operator=. performs = on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 288 of file MatrixBase.hpp.

◆ assignFrom() [2/5]

template<class T , class BaseClass >
template<class E >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::assignFrom ( const ConstVectorBase< T, E > &  x)
inline

performs = on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 308 of file MatrixBase.hpp.

◆ assignFrom() [3/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::assignFrom ( const std::valarray< T > &  x)
inline

performs = on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 328 of file MatrixBase.hpp.

◆ assignFrom() [4/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::assignFrom ( const T *  x)
inline

performs = on each element of this matrix with each element of x

Definition at line 346 of file MatrixBase.hpp.

◆ assignFrom() [5/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::assignFrom ( x)
inline

performs = on each element of this matrix with x

Definition at line 357 of file MatrixBase.hpp.

◆ cols()

template<class T , class BaseClass >
size_t gnsstk::RefMatrixBase< T, BaseClass >::cols ( ) const
inline

returns the number of columns in the matrix

Definition at line 234 of file MatrixBase.hpp.

◆ operator()()

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

returns a reference to the (i,j) element of the matrix.

Definition at line 227 of file MatrixBase.hpp.

◆ operator*=()

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

multiplies each element in this matrix by x.

Definition at line 541 of file MatrixBase.hpp.

◆ operator+=() [1/5]

template<class T , class BaseClass >
template<class E >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator+= ( const ConstMatrixBase< T, E > &  x)
inline

performs += on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 373 of file MatrixBase.hpp.

◆ operator+=() [2/5]

template<class T , class BaseClass >
template<class E >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator+= ( const ConstVectorBase< T, E > &  x)
inline

performs += on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 393 of file MatrixBase.hpp.

◆ operator+=() [3/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator+= ( const std::valarray< T > &  x)
inline

performs += on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 413 of file MatrixBase.hpp.

◆ operator+=() [4/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator+= ( const T *  x)
inline

performs += on each element of this matrix with each element of x

Definition at line 431 of file MatrixBase.hpp.

◆ operator+=() [5/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator+= ( x)
inline

performs += on each element of this matrix with x

Definition at line 442 of file MatrixBase.hpp.

◆ operator-()

template<class T , class BaseClass >
const BaseClass gnsstk::RefMatrixBase< T, BaseClass >::operator- ( )
inline

unary minus: multiplies each element in this matrix by -1.

Definition at line 565 of file MatrixBase.hpp.

◆ operator-=() [1/5]

template<class T , class BaseClass >
template<class E >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator-= ( const ConstMatrixBase< T, E > &  x)
inline

performs -= on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 459 of file MatrixBase.hpp.

◆ operator-=() [2/5]

template<class T , class BaseClass >
template<class E >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator-= ( const ConstVectorBase< T, E > &  x)
inline

performs -= on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 479 of file MatrixBase.hpp.

◆ operator-=() [3/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator-= ( const std::valarray< T > &  x)
inline

performs -= on each element of this matrix with each element of x

Exceptions
MatrixException

Definition at line 499 of file MatrixBase.hpp.

◆ operator-=() [4/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator-= ( const T *  x)
inline

performs -= on each element of this matrix with each element of x

Definition at line 517 of file MatrixBase.hpp.

◆ operator-=() [5/5]

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator-= ( x)
inline

performs -= on each element of this matrix with x

Definition at line 528 of file MatrixBase.hpp.

◆ operator/=()

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::operator/= ( const x)
inline

divides each element in this matrix by x.

Definition at line 553 of file MatrixBase.hpp.

◆ rows()

template<class T , class BaseClass >
size_t gnsstk::RefMatrixBase< T, BaseClass >::rows ( ) const
inline

returns the number of rows in the matrix

Definition at line 237 of file MatrixBase.hpp.

◆ size()

template<class T , class BaseClass >
size_t gnsstk::RefMatrixBase< T, BaseClass >::size ( ) const
inline

returns the rows()*cols() size of the matrix

Definition at line 231 of file MatrixBase.hpp.

◆ swapCols()

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::swapCols ( size_t  col1,
size_t  col2 
)
inline

swaps columns col1 and col2 in this matrix.

Exceptions
MatrixException

Definition at line 603 of file MatrixBase.hpp.

◆ swapRows()

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::swapRows ( size_t  row1,
size_t  row2 
)
inline

swaps rows row1 and row2 in this matrix.

Exceptions
MatrixException

Definition at line 579 of file MatrixBase.hpp.

◆ zeroize()

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::zeroize ( )
inline

any value with absolute value below RefVectorBaseHelper::zeroTolerance is set to 0.

Definition at line 241 of file MatrixBase.hpp.

◆ zeroizeCol()

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::zeroizeCol ( size_t  c)
inline

any value in column c with absolute value below RefVectorBaseHelper::zeroTolerance is set to 0.

Definition at line 264 of file MatrixBase.hpp.

◆ zeroizeRow()

template<class T , class BaseClass >
BaseClass& gnsstk::RefMatrixBase< T, BaseClass >::zeroizeRow ( size_t  r)
inline

any value in row r with absolute value below RefVectorBaseHelper::zeroTolerance is set to 0.

Definition at line 253 of file MatrixBase.hpp.


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


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