Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Matrix< T, SX, 1 > Class Template Reference

A specialization of the Matrix class for the case when SY=1. More...

#include <matrix.h>

Public Member Functions

 Matrix ()
 Default constructor, does nothing and no initialization.
 
constexpr Matrix (const T &t)
 Explicit constructor, initializes all elements to value t.
 
constexpr Matrix (const Matrix< T, SX, 1 > &m)
 Copy constructor.
 
constexpr Matrix (const std::array< T, SX > &a)
 
constexpr Matrix (const std::initializer_list< T > l)
 
constexpr const Matrix< T, SX, 1 > & operator= (const Matrix< T, SX, 1 > &m)
 Equality operator.
 
constexpr const T & get (unsigned x, unsigned y) const
 Retrieve constant value at row x column y. Bounds checking is done in a debug compile.
 
constexpr const T & get (unsigned x) const
 Retrieve constant value at row x. Bounds checking is done in a debug compile.
 
constexpr T & get (unsigned x, unsigned y)
 Retrieve value at row x column y. Bounds checking is done in a debug compile.
 
constexpr T & get (unsigned x)
 Retrieve value at row x. Bounds checking is done in a debug compile.
 
constexpr const T & operator() (unsigned x, unsigned y) const
 () operator access to const get(x,y)
 
constexpr const T & operator() (unsigned x) const
 () operator access to const get(x)
 
constexpr T & operator() (unsigned x, unsigned y)
 () operator access to get(x,y)
 
constexpr T & operator() (unsigned x)
 () operator access to get(x)
 
constexpr UVect2 size () const
 
constexpr const Matrix< T, SX, 1 > & operator+= (const Matrix< T, SX, 1 > &m)
 In-place matrix addition.
 
constexpr const Matrix< T, SX, 1 > & operator-= (const Matrix< T, SX, 1 > &m)
 In-place matrix subtraction.
 
constexpr const Matrix< T, SX, 1 > & operator*= (const T &t)
 In-place multiplication by a scalar.
 
constexpr const Matrix< T, SX, 1 > & operator/= (const T &t)
 In-place division by a scalar.
 
Matrix< T, SX, 1 > operator+ (const Matrix< T, SX, 1 > &m) const
 Binary addition operator.
 
Matrix< T, SX, 1 > operator- (const Matrix< T, SX, 1 > &m) const
 Binary subtraction operator.
 
Matrix< T, SX, 1 > operator* (const T &t) const
 Binary scalar multiplication operator.
 
Matrix< T, SX, 1 > operator/ (const T &t) const
 Binary scalar division operator.
 
template<unsigned SZ>
Matrix< T, SX, SZ > operator* (const Matrix< T, 1, SZ > &m) const
 Binary matrix multiplication operator – simplest naive approach.
 
template<unsigned BX, unsigned BY, unsigned SX2, unsigned SY2>
void addBlock (const Matrix< T, SX2, SY2 > &m, unsigned iSrc, unsigned jSrc, unsigned iDst, unsigned jDst)
 Adds a block to this matrix from matrix m using the block size (BX,BY), from block indices (iSrc,jSrc) to block indices (iDst,jDst)
 
template<unsigned BX, unsigned SX2>
void addBlock (const Matrix< T, SX2, 1 > &m, unsigned iSrc, unsigned iDst)
 Adds a block to this matrix from matrix m using the block size BX from block indice iSrc to indice iDst.
 
template<unsigned BX, unsigned BY, unsigned SX2, unsigned SY2>
void addGenBlock (const Matrix< T, SX2, SY2 > &m, unsigned iSrc, unsigned jSrc, unsigned iDst, unsigned jDst)
 Adds a block to this matrix from matrix m using the block size (BX,BY), from normal not block indices (iSrc,jSrc) to (iDst,jDst)
 
template<unsigned BX, unsigned SX2>
void addGenBlock (const Matrix< T, SX2, 1 > &m, unsigned iSrc, unsigned iDst)
 Adds a block to this matrix from matrix m using the block size BX from normal non block indice iSrc to indice iDst.
 
maxNorm () const
 Returns the infinity norm of the matrix, or the maximum absolute magnitude of any element.
 
Matrix< T, 1, SX > transpose () const
 returns the transposed matrix of this matrix
 
void set (const T &t=T())
 Sets all matrix elemnts to T.
 
constexpr T minEntry () const
 
constexpr T maxEntry () const
 

Static Public Member Functions

static Matrix< T, SX, 1 > identity ()
 Returns an identity matrix (or as close as you can get if not diagonal).
 

Public Attributes

t_ [SX]
 

Detailed Description

template<class T, unsigned SX>
class Matrix< T, SX, 1 >

A specialization of the Matrix class for the case when SY=1.


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