KrisLibrary  1.0.0
Public Types | Public Member Functions | List of all members
Math::DiagonalMatrixTemplate< T > Class Template Reference

A templated diagonal matrix, represented by a vector of the entries on the diagonal. More...

#include <DiagonalMatrix.h>

Inheritance diagram for Math::DiagonalMatrixTemplate< T >:
Math::VectorTemplate< T >

Public Types

typedef class DiagonalMatrixTemplate< T > MyT
 
typedef class VectorTemplate< T > BaseT
 
typedef class VectorIterator< T > ItT
 
typedef class MatrixTemplate< T > MatrixT
 
typedef class VectorTemplate< T > VectorT
 
- Public Types inherited from Math::VectorTemplate< T >
typedef VectorTemplate< T > MyT
 
typedef VectorIterator< T > ItT
 

Public Member Functions

 DiagonalMatrixTemplate (const BaseT &)
 
 DiagonalMatrixTemplate (int m)
 
 DiagonalMatrixTemplate (int m, T diagVal)
 
 DiagonalMatrixTemplate (int m, const T *diagVals)
 
int numCols () const
 
int numRows () const
 
const MyT & operator= (const MyT &m)
 
void operator+= (const MyT &m)
 
void operator-= (const MyT &m)
 
void operator*= (const MyT &)
 
void operator*= (T c)
 
void operator/= (T c)
 
void copyDiagonal (const MatrixT &m)
 
void mulMatrix (const MyT &a, const MyT &b)
 
void mulVector (const VectorT &, VectorT &) const
 
void mulInverse (const VectorT &, VectorT &) const
 
void mulPseudoInverse (const VectorT &, VectorT &) const
 
void preMultiply (const MatrixT &a, MatrixT &x) const
 
void postMultiply (const MatrixT &a, MatrixT &x) const
 
void preMultiplyTranspose (const MatrixT &a, MatrixT &x) const
 
void postMultiplyTranspose (const MatrixT &a, MatrixT &x) const
 
void preMultiplyInverse (const MatrixT &a, MatrixT &x) const
 
void postMultiplyInverse (const MatrixT &a, MatrixT &x) const
 
void setIdentity ()
 
void setInverse (const MyT &)
 
void setPseudoInverse (const MyT &)
 
void inplaceInverse ()
 
void inplacePseudoInverse ()
 
bool isZero (T eps=Zero) const
 
bool isIdentity (T eps=Zero) const
 
bool isInvertible (T eps=Zero) const
 
determinant () const
 
trace () const
 
- Public Member Functions inherited from Math::VectorTemplate< T >
 VectorTemplate (const MyT &)
 
 VectorTemplate (MyT &&)
 
 VectorTemplate (int n)
 
 VectorTemplate (int n, T initval)
 
 VectorTemplate (int n, const T *vals)
 
 VectorTemplate (const std::vector< T > &vals)
 
T * getPointer () const
 
int getCapacity () const
 
T * getStart () const
 
ItT begin () const
 
ItT end () const
 
int size () const
 
bool empty () const
 
void resize (int size)
 
void resize (int size, T initval)
 
void resizePersist (int size)
 
void resizePersist (int size, T initval)
 
void clear ()
 
MyToperator= (const MyT &v)
 
MyToperator= (MyT &&v)
 
bool operator== (const MyT &) const
 
bool operator!= (const MyT &a) const
 
 operator T * ()
 
 operator const T * () const
 
 operator std::vector< T > () const
 
MyToperator= (const std::vector< T > &v)
 
const T & operator() (int i) const
 
T & operator() (int i)
 
const T & operator[] (int i) const
 
T & operator[] (int i)
 
void operator+= (const MyT &a)
 
void operator-= (const MyT &a)
 
void operator*= (T c)
 
void operator/= (T c)
 
void copy (const MyT &)
 
template<class T2 >
void copy (const VectorTemplate< T2 > &)
 
void copy (const T *vals)
 
template<class T2 >
void copy (const std::vector< T2 > &vals)
 
void copySubVector (int i, const MyT &)
 
void swap (MyT &)
 
void swapCopy (MyT &)
 
void add (const MyT &, const MyT &)
 
void sub (const MyT &, const MyT &)
 
void mul (const MyT &, T)
 
void div (const MyT &, T)
 
void axpby (T a, const MyT &x, T b, const MyT &y)
 
void inc (const T &)
 
void inc (const MyT &)
 
void dec (const MyT &)
 
void madd (const MyT &, T)
 
void setRef (const MyT &, int base=0, int stride=1, int size=-1)
 
void setRef (T *vals, int length, int base=0, int stride=1, int size=-1)
 
void set (T)
 
void setZero ()
 
void setNegative (const MyT &)
 
void setNormalized (const MyT &)
 
void setConjugate (const MyT &)
 
void inplaceNegative ()
 
void inplaceMul (T)
 
void inplaceDiv (T)
 
void inplaceNormalize ()
 
void inplaceConjugate ()
 
void getCopy (MyT &) const
 
void getCopy (T *vals) const
 
void getSubVectorCopy (int i, MyT &) const
 
void getRef (MyT &, int base=0, int stride=1, int size=-1) const
 
void getNegative (MyT &v) const
 
void getNormalized (MyT &v) const
 
void getConjugate (MyT &v) const
 
bool isReference () const
 
bool isUninitialized () const
 
bool isValidIndex (int i) const
 
bool isCompact () const
 
bool isValid () const
 
bool isZero (T eps=0) const
 
bool isEqual (const MyT &, T eps=0) const
 
dot (const MyT &) const
 
dotSelf () const
 
norm () const
 
normSquared () const
 
distance (const MyT &) const
 
distanceSquared (const MyT &) const
 
minElement (int *index=NULL) const
 
maxElement (int *index=NULL) const
 
minAbsElement (int *index=NULL) const
 
maxAbsElement (int *index=NULL) const
 
bool Read (File &)
 
bool Write (File &) const
 
void componentMul (const MyT &a, const MyT &b)
 
void componentDiv (const MyT &a, const MyT &b)
 
void componentMadd (const MyT &a, const MyT &b)
 
void inplaceComponentMul (const MyT &c)
 
void inplaceComponentDiv (const MyT &c)
 
template<class UnaryOp >
void componentOp (const MyT &a, UnaryOp &f)
 for each element xi, sets xi = f(ai)
 
template<class BinaryOp >
void componentOp (const MyT &a, const MyT &b, BinaryOp &f)
 for each element xi, sets xi = f(ai,bi)
 
template<class BinaryOp >
void componentOp (const MyT &a, T c, BinaryOp &f)
 for each element xi, sets xi = f(ai,c)
 
template<class UnaryOp >
void inplaceComponentOp (UnaryOp &f)
 for each element xi, sets xi = f(xi)
 
template<class BinaryOp >
void inplaceComponentOp (const MyT &c, BinaryOp &f)
 for each element xi, sets xi = f(xi,ci)
 
template<class BinaryOp >
void inplaceComponentOp (T c, BinaryOp &f)
 for each element xi, sets xi = f(xi,c)
 
template<>
void setConjugate (const MyT &a)
 
template<>
void inplaceConjugate ()
 
template<>
Complex dotSelf () const
 
template<>
Complex minElement (int *index) const
 
template<>
Complex maxElement (int *index) const
 
template<>
Complex minAbsElement (int *index) const
 
template<>
Complex maxAbsElement (int *index) const
 

Additional Inherited Members

- Public Attributes inherited from Math::VectorTemplate< T >
int base
 
int stride
 
int n
 

Detailed Description

template<class T>
class Math::DiagonalMatrixTemplate< T >

A templated diagonal matrix, represented by a vector of the entries on the diagonal.


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