Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

Matrix Operations
[Data Manipulation]

Collaboration diagram for Matrix Operations:


Files

file  psMatrix.h
 Provides functions for linear algebra operations on psImages and psVectors.

Functions

psImagepsMatrixLUD (psImage *outImage, psVector **outPerm, psImage *inImage)
 LU Decomposition of psImage matrix.
psVectorpsMatrixLUSolve (psVector *outVector, const psImage *luImage, const psVector *inVector, const psVector *inPerm)
 LU Solution of psImage matrix.
psImagepsMatrixInvert (psImage *outImage, const psImage *inImage, psF32 *det)
 Invert psImage matrix.
psF32psMatrixDeterminant (const psImage *inMatrix)
 Calculate psImage matrix determinant.
psImagepsMatrixMultiply (psImage *outImage, psImage *inImage1, psImage *inImage2)
 Performs psImage matrix multiplication.
psImagepsMatrixTranspose (psImage *outImage, const psImage *inImage)
 Transpose matrix.
psImagepsMatrixEigenvectors (psImage *outImage, psImage *inImage)
 Calculate matrix eigenvectors.
psVectorpsMatrixToVector (psVector *outVector, const psImage *inImage)
 Convert matrix to vector.
psImagepsVectorToMatrix (psImage *outImage, const psVector *inVector)
 Convert vector to matrix.


Function Documentation

psF32* psMatrixDeterminant const psImage inMatrix  ) 
 

Calculate psImage matrix determinant.

Calculates the determinant of a psImage matrix and returns the single precision floating point result. The input image must be square. This function operates only with the psF64 data type. GSL indexes the top row as the zero row, not the bottom.

Returns:
float: Determinant from psImage.
Parameters:
inMatrix  Image used to calculate determinant.

psImage* psMatrixEigenvectors psImage outImage,
psImage inImage
 

Calculate matrix eigenvectors.

Calculates the eigenvectors for a matrix. The input image must be symmetric and square. If the user specifies NULL as the outImage argument, then it will automatically be created. This function operates only with the psF64 data type. GSL indexes the top row as the zero row, not the bottom.

Returns:
psImage* : Pointer to matrix of Eigenvectors.
Parameters:
outImage  Eigenvectors to return, or NULL.
inImage  Input image.

psImage* psMatrixInvert psImage outImage,
const psImage inImage,
psF32 det
 

Invert psImage matrix.

Inverts a psImage matrix and returns the determinant as an option through the argument list. If the user specifies NULL as the outImage argument, then it will automatically be created. The input image must be square. This function operates only with the psF64 data type. Input and output arguments should not be the same. GSL indexes the top row as the zero row, not the bottom.

Returns:
psImage* : Pointer to inverted psImage.
Parameters:
outImage  Image to return, or NULL for in-place substitution.
inImage  Image to be inverted
det  Determinant to return, or NULL

psImage* psMatrixLUD psImage outImage,
psVector **  outPerm,
psImage inImage
 

LU Decomposition of psImage matrix.

Performs a LU decomposition on a psImage matrix and returns the LU matrix. If the user specifies NULL for the outImage or outPerm arguments, then they will be automatically created. The input image must be square. This function operates only with the psF64 data type. Input and output arguments should not be the same. GSL indexes the top row as the zero row, not the bottom.

Returns:
psImage* : Pointer to LU decomposed psImage.
Parameters:
outImage  Image to return, or NULL.
outPerm  Output permutation vector used by psMatrixLUSolve.
inImage  Image to decompose.

psVector* psMatrixLUSolve psVector outVector,
const psImage luImage,
const psVector inVector,
const psVector inPerm
 

LU Solution of psImage matrix.

Solves for and returns the psVector, {x} in the equation [A]{x} = {b}. If the user specifies NULL as the outVector argument, then it will automatically be created. The input image must be square. This function operates only with the psF64 data type. Input and output arguments should not be the same. GSL indexes the top row as the zero row, not the bottom.

Returns:
psVector* : Pointer to psVector solution of matrix equation.
Parameters:
outVector  Vector to return, or NULL.
luImage  LU-decomposed matrix.
inVector  Vector right-hand-side of equation.
inPerm  Permutation vector resulting from psMatrixLUD function.

psImage* psMatrixMultiply psImage outImage,
psImage inImage1,
psImage inImage2
 

Performs psImage matrix multiplication.

Performs a classical matrix multiplication involving row and column operations. Input images must be square and the same size. If the user specifies NULL as the outImage argument, then it will automatically be created. This function operates only with the psF64 data type. GSL indexes the top row as the zero row, not the bottom.

Returns:
psImage* : Pointer to resulting psImage.
Parameters:
outImage  Matrix to return, or NULL.
inImage1  First input image.
inImage2  Second input image.

psVector* psMatrixToVector psVector outVector,
const psImage inImage
 

Convert matrix to vector.

Converts a 1-d psImage matrix into a vector. If the user specifies NULL as the outVector argument, then it will automatically be created based on the input image (PS_DIMEN_VECTOR for an input image with 1 col or PS_DIMENT_TRANSV for an input image with 1 row). Either the number of rows or the number of colums of the input matrix must be 1. This function operates only with the psF64 data type.

Returns:
psVector* : Pointer to psVector.
Parameters:
outVector  Vector to return, or NULL.
inImage  Image to convert.

psImage* psMatrixTranspose psImage outImage,
const psImage inImage
 

Transpose matrix.

Performs psImage matrix transpose by substituting existing rows for columns. The input image must be square. If the user specifies NULL as the outImage argument, then it will automaticallty be created. This function operates only with the psF64 data type. GSL indexes the top row as the zero row, not the bottom.

Returns:
psImage* : Pointer to transposed psImage.
Parameters:
outImage  Image to return, or NULL
inImage  Image to transpose

psImage* psVectorToMatrix psImage outImage,
const psVector inVector
 

Convert vector to matrix.

Converts a vector into a psImage matrix. If the dimensionality of the vector is PS_DIMEN_VECTOR, then the resulting psImage is a 1d column. If the dimensionality of the vector is PS_DIMEN_TRANSV, then the resulting psImage is a 1d row. If the user specifies NULL as the outImage argument, then it will automatically be created. This function operates only with the psF64 data type.

Returns:
psVector* : Pointer to psIamge.
Parameters:
outImage  Matrix to return, or NULL.
inVector  Vector to convert.


Generated on Wed Jun 15 11:01:15 2005 for Pan-STARRS Foundation Library by  doxygen 1.4.1