LINEAR_ALGEBRA
Function
Linear_Algebra contains procedures for various matrix and vector manipulations.
Dependencies
Module | Variables |
DEFINITIONS | DP |
Public Variables
None.
Public Procedures
There are four public functions and two public subroutines in this module.
Function | Type | Purpose |
CROSS_PRODUCT | Real(1:3) | Calculate the cross product of two 3-vectors. |
DETERMINANT | Real | Calculate the determinant of a 3 by 3 matrix. |
NORM | Real | Calculate the norm of a vector. |
NORMALIZE | Real(:) | Normalize a vector. |
Subroutine | Purpose |
PROJECT_OUT | Project out from a set of vectors from a vector. |
SCHMIDT_ORTHOGONALIZE | Schmidt orthogonalize a set of vectors. |
CROSS_PRODUCT
Argument | Type | Intent | Optional | Purpose |
A | Real(1:3) | In | No | The first vector of the cross product. |
B | Real(1:3) | In | No | The second vector of the cross product. |
- CROSS_PRODUCT returns the cross product of the vectors A and B.
DETERMINANT
Argument | Type | Intent | Optional | Purpose |
A | Real(1:3,1:3) | In | No | The 3 by 3 matrix. |
- DETERMINANT returns the determinant of the matrix A.
NORM
Argument | Type | Intent | Optional | Purpose |
VECTOR | Real(:) | In | No | The vector whose norm is to be calculated. |
- NORM returns the norm of the vector VECTOR.
NORMALIZE
Argument | Type | Intent | Optional | Purpose |
VECTOR | Real(:) | In | No | The vector to be normalized. |
- NORMALIZE returns as its function result the normalized VECTOR.
PROJECT_OUT
Argument | Type | Intent | Optional | Purpose |
VECTOR | Real(:) | InOut | No | The vector to be modified. |
VECTORS | Real(:,:) | In | No | The set of vectors to project out. |
- PROJECT_OUT projects out VECTORS from VECTOR. For this subroutine to do something, SIZE ( VECTOR, 1 ) and
SIZE ( VECTORS, 1 ) must be the same and SIZE ( VECTORS, 2 ) must be greater than 0.
SCHMIDT_ORTHOGONALIZE
Argument | Type | Intent | Optional | Purpose |
VECTORS | Real(:,:) | InOut | No | The set of vectors to be orthogonalized. |
NINDEPENDENT | Integer | Out | No | The number of independent orthogonalized vectors. |
- SCHMIDT_ORTHOGONALIZE orthogonalizes the vectors in VECTORS, in place, and returns the number of independent vectors
in the argument NINDEPENDENT. To work both dimensions of VECTORS must be of non-zero length.
Stability
Stable.