MatrixMath.h

Classes

Global Functions -- Linear algebra functions on Vectors and Matrices. (full description)

Linear algebra functions on Vectors and Matrices. (source)

Interface

T innerProduct (const Vector<T> &x, const Vector<T> &y)
Complex innerProduct (const Vector<Complex> &x, const Vector<Complex> &y)
DComplex innerProduct (const Vector<DComplex> &x, const Vector<DComplex> &y)
Int norm (const Vector<Int> &x)
Float norm (const Vector<Float> &x)
Double norm (const Vector<Double> &x)
Float norm (const Vector<Complex> &x)
Double norm (const Vector<DComplex> &x)
Vector<T> crossProduct (const Vector<T> &x, const Vector<T> &y)
Matrix<T> product (const Vector<T> &x, const Matrix<T> &yT)
Vector<T> product (const Matrix<T> &A, const Vector<T> &x)
Vector<T> directProduct(const Vector<T>& x, const Vector<T>& y)
Matrix<T> product (const Matrix<T> &A, const Matrix<T> &B)
Int normI(const Matrix<Int> &A)
Float normI(const Matrix<Float> &A)
Double normI(const Matrix<Double> &A)
Float normI(const Matrix<Complex> &A)
Double normI(const Matrix<DComplex> &A)
Int norm1(const Matrix<Int> &A)
Float norm1(const Matrix<Float> &A)
Double norm1(const Matrix<Double> &A)
Float norm1(const Matrix<Complex> &A)
Double norm1(const Matrix<DComplex> &A)
Matrix<T> transpose (const Matrix<T> &A)
Matrix<T> Rot3D(Int axis, T angle)
Matrix<Double> Rot3D(Int axis, Double angle)
Matrix<Float> Rot3D(Int axis, Float angle)
Matrix<T> directProduct(const Matrix<T>& A, const Matrix<T>& B)
Matrix<Complex> conjugate (const Matrix<Complex> &A)
Matrix<DComplex> conjugate (const Matrix<DComplex> &A)
Matrix<Complex> adjoint (const Matrix<Complex> &A)
Matrix<DComplex> adjoint (const Matrix<DComplex> &A)
Matrix<Int> adjoint (const Matrix<Int> &A)
Matrix<Float> adjoint (const Matrix<Float> &A)
Matrix<Double> adjoint (const Matrix<Double> &A)
Vector<Complex> product(const Matrix<Complex>&, const Vector<Float>&)
Vector<Float> rproduct(const Matrix<Complex>&, const Vector<Complex>&)
Matrix<Float> rproduct (const Matrix<Complex>&, const Matrix<Complex>&)

Description

Review Status

Reviewed By:
UNKNOWN
Date Reviewed:
before2004/08/25
Programs:
Tests:

Member Description

T innerProduct (const Vector<T> &x, const Vector<T> &y)
Complex innerProduct (const Vector<Complex> &x, const Vector<Complex> &y)
DComplex innerProduct (const Vector<DComplex> &x, const Vector<DComplex> &y)

The scalar/dot/inner product of two equal length vectors.

Int norm (const Vector<Int> &x)
Float norm (const Vector<Float> &x)
Double norm (const Vector<Double> &x)
Float norm (const Vector<Complex> &x)
Double norm (const Vector<DComplex> &x)

The magnitude/norm of a vector.

Vector<T> crossProduct (const Vector<T> &x, const Vector<T> &y)

The vector/cross product of two 3-space vectors.

Matrix<T> product (const Vector<T> &x, const Matrix<T> &yT)

The matrix/outer product of a vector and a transposed vector. The function's second argument is actually a transposed vector stored as the only row in a 1xN matrix.

Vector<T> product (const Matrix<T> &A, const Vector<T> &x)

The vector/outer product of an MxN matrix and an N-length vector.

Vector<T> directProduct(const Vector<T>& x, const Vector<T>& y)

The direct product of two vectors. The resulting vector contains for every element of x, the product of that element and Vector y. Thus the length of the output vector is the product of the input lengths.

Matrix<T> product (const Matrix<T> &A, const Matrix<T> &B)

The matrix multiplication or cayley product of an MxN matrix and an NxP matrix.

Int normI(const Matrix<Int> &A)
Float normI(const Matrix<Float> &A)
Double normI(const Matrix<Double> &A)
Float normI(const Matrix<Complex> &A)
Double normI(const Matrix<DComplex> &A)

The infinity norm (or maximum value of the sum of the absolute values of the rows members of a matrix)

Int norm1(const Matrix<Int> &A)
Float norm1(const Matrix<Float> &A)
Double norm1(const Matrix<Double> &A)
Float norm1(const Matrix<Complex> &A)
Double norm1(const Matrix<DComplex> &A)

The one norm (or maximum value of the sum of the absolute values of the column members of a matrix)

Matrix<T> transpose (const Matrix<T> &A)

The NxM transpose of an MxN matrix.

Matrix<T> Rot3D(Int axis, T angle)
Matrix<Double> Rot3D(Int axis, Double angle)
Matrix<Float> Rot3D(Int axis, Float angle)

Create a 3D rotation matrix (3x3). Axis is 0,1,2 for x,y,z; angle is in radians.

Matrix<T> directProduct(const Matrix<T>& A, const Matrix<T>& B)

The direct product of two matrices. The resulting matrix contains for every element of A, the product of that element and Matrix B. Thus the shape of the output matrix is the (element by element) product of the input shapes.

Matrix<Complex> conjugate (const Matrix<Complex> &A)

The complex conjugate of the complex matrix A.

Matrix<DComplex> conjugate (const Matrix<DComplex> &A)

The complex conjugate of the double precision complex matrix A.

Matrix<Complex> adjoint (const Matrix<Complex> &A)

The conjugate/transpose or adjoint of the complex matrix A.

Matrix<DComplex> adjoint (const Matrix<DComplex> &A)

Matrix<Int> adjoint (const Matrix<Int> &A)

define the adjoint operator as a plain old transpose when the Matrix is not complex valued. (for templating purposes)

Matrix<Float> adjoint (const Matrix<Float> &A)

Matrix<Double> adjoint (const Matrix<Double> &A)

Vector<Complex> product(const Matrix<Complex>&, const Vector<Float>&)

The product of a Complex Matrix and a Real Vector

Vector<Float> rproduct(const Matrix<Complex>&, const Vector<Complex>&)

The real part of a product of a Complex Matrix and a Complex Vector

Matrix<Float> rproduct (const Matrix<Complex>&, const Matrix<Complex>&)

The real part of a product of a Complex Matrix and a Complex Matrix