Implementation of basic linear algebra functionality in Euclidean space. More...
#include <Intrepid_RealSpaceTools.hpp>
Public Member Functions | |
| template<class MatArray > | |
| void | transpose (MatArray &transposeMats, const MatArray &inMats) |
Static Public Member Functions | |
| static void | absval (Scalar *absArray, const Scalar *inArray, const int size) |
| Computes absolute value of contiguous input data inArray of size size. | |
| static void | absval (Scalar *inoutArray, const int size) |
| Computes absolute value of contiguous data inoutAbsArray of size size in place. | |
| template<class ArrayScalar > | |
| static void | absval (ArrayScalar &absArray, const ArrayScalar &inArray) |
| Computes absolute value of an array. | |
| template<class ArrayScalar > | |
| static void | absval (ArrayScalar &inoutAbsArray) |
| Computes, in place, absolute value of an array. | |
| static Scalar | vectorNorm (const Scalar *inVec, const int dim, const ENorm normType) |
| Computes norm (1, 2, infinity) of the vector inVec of size dim. | |
| template<class VecArray > | |
| static Scalar | vectorNorm (const VecArray &inVec, const ENorm normType) |
| Computes norm (1, 2, infinity) of a single vector stored in an array of rank 1. | |
| template<class NormArray , class VecArray > | |
| static void | vectorNorm (NormArray &normArray, const VecArray &inVecs, const ENorm normType) |
| Computes norms (1, 2, infinity) of vectors stored in a array of total rank 2 (array of vectors), indexed by (i0, D), or 3 (array of arrays of vectors), indexed by (i0, i1, D). | |
| static void | transpose (Scalar *transposeMat, const Scalar *inMat, const int dim) |
| Computes transpose of the square matrix inMat of size dim by dim. | |
| template<class ArrayScalar > | |
| static void | transpose (ArrayScalar &transposeMats, const ArrayScalar &inMats) |
| Computes transposes of square matrices stored in an array of total rank 2 (single matrix), indexed by (D, D), 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D). | |
| static void | inverse (Scalar *inverseMat, const Scalar *inMat, const int dim) |
| Computes inverse of the square matrix inMat of size dim by dim. | |
| template<class MatArray > | |
| static void | inverse (MatArray &inverseMats, const MatArray &inMats) |
| Computes inverses of nonsingular matrices stored in an array of total rank 2 (single matrix), indexed by (D, D), 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D). | |
| static Scalar | det (const Scalar *inMat, const int dim) |
| Computes determinant of the square matrix inMat of size dim by dim. | |
| template<class ArrayScalar > | |
| static Scalar | det (const ArrayScalar &inMat) |
| Computes determinant of a single square matrix stored in an array of rank 2. | |
| template<class DetArray , class MatArray > | |
| static void | det (DetArray &detArray, const MatArray &inMats) |
| Computes determinants of matrices stored in an array of total rank 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D). | |
| static void | add (Scalar *sumArray, const Scalar *inArray1, const Scalar *inArray2, const int size) |
| Adds contiguous data inArray1 and inArray2 of size size: sumArray = inArray1 + inArray2. | |
| static void | add (Scalar *inoutSumArray, const Scalar *inArray, const int size) |
| Adds, in place, contiguous data inArray into inoutSumArray of size size: inoutSumArray = inoutSumArray + inArray. | |
| template<class ArrayScalar > | |
| static void | add (ArrayScalar &sumArray, const ArrayScalar &inArray1, const ArrayScalar &inArray2) |
| Adds arrays inArray1 and inArray2: sumArray = inArray1 + inArray2. | |
| template<class ArrayScalar > | |
| static void | add (ArrayScalar &inoutSumArray, const ArrayScalar &inArray) |
| Adds, in place, inArray into inoutSumArray: inoutSumArray = inoutSumArray + inArray. | |
| static void | subtract (Scalar *diffArray, const Scalar *inArray1, const Scalar *inArray2, const int size) |
| Subtracts contiguous data inArray2 from inArray1 of size size: diffArray = inArray1 - inArray2. | |
| static void | subtract (Scalar *inoutDiffArray, const Scalar *inArray, const int size) |
| Subtracts, in place, contiguous data inArray from inoutDiffArray of size size: inoutDiffArray = inoutDiffArray - inArray. | |
| template<class ArrayScalar > | |
| static void | subtract (ArrayScalar &diffArray, const ArrayScalar &inArray1, const ArrayScalar &inArray2) |
| Subtracts inArray2 from inArray1: diffArray = inArray1 - inArray2. | |
| template<class ArrayScalar > | |
| static void | subtract (ArrayScalar &inoutDiffArray, const ArrayScalar &inArray) |
| Subtracts, in place, inArray from inoutDiffArray: inoutDiffArray = inoutDiffArray - inArray. | |
| static void | scale (Scalar *scaledArray, const Scalar *inArray, const int size, const Scalar scalar) |
| Multiplies contiguous data inArray of size size by a scalar (componentwise): scaledArray = scalar * inArray. | |
| static void | scale (Scalar *inoutScaledArray, const int size, const Scalar scalar) |
| Multiplies, in place, contiguous data inoutScaledArray of size size by a scalar (componentwise): inoutScaledArray = scalar * inoutScaledArray. | |
| template<class ArrayScalar > | |
| static void | scale (ArrayScalar &scaledArray, const ArrayScalar &inArray, const Scalar scalar) |
| Multiplies array inArray by the scalar scalar (componentwise): scaledArray = scalar * inArray. | |
| template<class ArrayScalar > | |
| static void | scale (ArrayScalar &inoutScaledArray, const Scalar scalar) |
| Multiplies, in place, array inoutScaledArray by the scalar scalar (componentwise): inoutScaledArray = scalar * inoutScaledArray. | |
| static Scalar | dot (const Scalar *inArray1, const Scalar *inArray2, const int size) |
| Computes dot product of contiguous data inArray1 and inArray2 of size size. | |
| template<class VecArray > | |
| static Scalar | dot (const VecArray &inVec1, const VecArray &inVec2) |
| Computes dot product of two vectors stored in arrays of rank 1. | |
| template<class DotArray , class VecArray > | |
| static void | dot (DotArray &dotArray, const VecArray &inVecs1, const VecArray &inVecs2) |
| Computes dot product of vectors stored in an array of total rank 2 (array of vectors), indexed by (i0, D), or 3 (array of arrays of vectors), indexed by (i0, i1, D). | |
| static void | matvec (Scalar *matVec, const Scalar *inMat, const Scalar *inVec, const int dim) |
| Matrix-vector left multiply using contiguous data: matVec = inMat * inVec. | |
| template<class MatArray , class VecArray > | |
| static void | matvec (VecArray &matVecs, const MatArray &inMats, const VecArray &inVecs) |
| Matrix-vector left multiply using multidimensional arrays: matVec = inMat * inVec. | |
| template<class VecArrayOut , class VecArrayIn > | |
| static void | vecprod (VecArrayOut &vecProd, const VecArrayIn &inLeft, const VecArrayIn &inRight) |
| Vector product using multidimensional arrays: vecProd = inVecLeft x inVecRight. | |
Implementation of basic linear algebra functionality in Euclidean space.
Definition at line 49 of file Intrepid_RealSpaceTools.hpp.
| void Intrepid::RealSpaceTools< Scalar >::absval | ( | ArrayScalar & | inoutAbsArray | ) | [inline, static] |
Computes, in place, absolute value of an array.
| inoutAbsArray | [in/out] - input/output array |
Definition at line 81 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::absval | ( | ArrayScalar & | absArray, | |
| const ArrayScalar & | inArray | |||
| ) | [inline, static] |
Computes absolute value of an array.
| outArray | [out] - output array | |
| inArray | [in] - input array |
Definition at line 60 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::absval | ( | Scalar * | inoutArray, | |
| const int | size | |||
| ) | [inline, static] |
Computes absolute value of contiguous data inoutAbsArray of size size in place.
| inoutAbsArray | [in/out] - input/output data | |
| size | [in] - size |
Definition at line 50 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::absval | ( | Scalar * | absArray, | |
| const Scalar * | inArray, | |||
| const int | size | |||
| ) | [inline, static] |
Computes absolute value of contiguous input data inArray of size size.
| absArray | [out] - output data | |
| inArray | [in] - input data | |
| size | [in] - size |
Definition at line 41 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::add | ( | ArrayScalar & | inoutSumArray, | |
| const ArrayScalar & | inArray | |||
| ) | [inline, static] |
Adds, in place, inArray into inoutSumArray:
inoutSumArray = inoutSumArray + inArray.
| inoutSumArray | [in/out] - sum/first summand | |
| inArray | [in] - second summand |
Definition at line 933 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::add | ( | ArrayScalar & | sumArray, | |
| const ArrayScalar & | inArray1, | |||
| const ArrayScalar & | inArray2 | |||
| ) | [inline, static] |
Adds arrays inArray1 and inArray2:
sumArray = inArray1 + inArray2.
| sumArray | [out] - sum | |
| inArray1 | [in] - first summand | |
| inArray2 | [in] - second summand |
Definition at line 912 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::add | ( | Scalar * | inoutSumArray, | |
| const Scalar * | inArray, | |||
| const int | size | |||
| ) | [inline, static] |
Adds, in place, contiguous data inArray into inoutSumArray of size size:
inoutSumArray = inoutSumArray + inArray.
| inoutSumArray | [in/out] - sum / first summand | |
| inArray | [in] - second summand | |
| size | [in] - size of input/output data |
Definition at line 902 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::add | ( | Scalar * | sumArray, | |
| const Scalar * | inArray1, | |||
| const Scalar * | inArray2, | |||
| const int | size | |||
| ) | [inline, static] |
Adds contiguous data inArray1 and inArray2 of size size:
sumArray = inArray1 + inArray2.
| sumArray | [out] - sum | |
| inArray1 | [in] - first summand | |
| inArray2 | [in] - second summand | |
| size | [in] - size of input/output data |
Definition at line 893 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::det | ( | DetArray & | detArray, | |
| const MatArray & | inMats | |||
| ) | [inline, static] |
Computes determinants of matrices stored in an array of total rank 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D).
| detArray | [out] - array of determinants indexed by (i0) or (i0, i1) | |
| inMats | [in] - array of matrices indexed by (i0, D, D) or (i0, i1, D, D) |
Definition at line 764 of file Intrepid_RealSpaceToolsDef.hpp.
| Scalar Intrepid::RealSpaceTools< Scalar >::det | ( | const ArrayScalar & | inMat | ) | [inline, static] |
Computes determinant of a single square matrix stored in an array of rank 2.
| inMat | [in] - array representing a single matrix, indexed by (D, D) |
Definition at line 681 of file Intrepid_RealSpaceToolsDef.hpp.
| Scalar Intrepid::RealSpaceTools< Scalar >::det | ( | const Scalar * | inMat, | |
| const int | dim | |||
| ) | [inline, static] |
Computes determinant of the square matrix inMat of size dim by dim.
| inMat | [in] - matrix | |
| dim | [in] - matrix dimension |
Definition at line 613 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::dot | ( | DotArray & | dotArray, | |
| const VecArray & | inVecs1, | |||
| const VecArray & | inVecs2 | |||
| ) | [inline, static] |
Computes dot product of vectors stored in an array of total rank 2 (array of vectors), indexed by (i0, D), or 3 (array of arrays of vectors), indexed by (i0, i1, D).
| dotArray | [out] - dot product array indexed by (i0) or (i0, i1) | |
| inVecs1 | [in] - first array of vectors indexed by (i0, D) or (i0, i1, D) | |
| inVecs2 | [in] - second array of vectors indexed by (i0, D) or (i0, i1, D) |
Definition at line 1098 of file Intrepid_RealSpaceToolsDef.hpp.
References Intrepid::RealSpaceTools< Scalar >::dot().
| Scalar Intrepid::RealSpaceTools< Scalar >::dot | ( | const VecArray & | inVec1, | |
| const VecArray & | inVec2 | |||
| ) | [inline, static] |
Computes dot product of two vectors stored in arrays of rank 1.
| inVec1 | [in] - first vector | |
| inVec2 | [in] - second vector |
Definition at line 1076 of file Intrepid_RealSpaceToolsDef.hpp.
References Intrepid::RealSpaceTools< Scalar >::dot().
| Scalar Intrepid::RealSpaceTools< Scalar >::dot | ( | const Scalar * | inArray1, | |
| const Scalar * | inArray2, | |||
| const int | size | |||
| ) | [inline, static] |
Computes dot product of contiguous data inArray1 and inArray2 of size size.
| inArray1 | [in] - first array | |
| inArray2 | [in] - second array | |
| size | [in] - size of input arrays |
Definition at line 1064 of file Intrepid_RealSpaceToolsDef.hpp.
Referenced by Intrepid::RealSpaceTools< Scalar >::dot().
| void Intrepid::RealSpaceTools< Scalar >::inverse | ( | MatArray & | inverseMats, | |
| const MatArray & | inMats | |||
| ) | [inline, static] |
Computes inverses of nonsingular matrices stored in an array of total rank 2 (single matrix), indexed by (D, D), 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D).
| inverseMats | [out] - array of inverses indexed by (D, D), (i0, D, D) or (i0, i1, D, D) | |
| inMats | [in] - array of matrices indexed by (D, D), (i0, D, D) or (i0, i1, D, D) |
Definition at line 444 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::inverse | ( | Scalar * | inverseMat, | |
| const Scalar * | inMat, | |||
| const int | dim | |||
| ) | [inline, static] |
Computes inverse of the square matrix inMat of size dim by dim.
| inverseMat | [out] - matrix inverse | |
| inMat | [in] - matrix | |
| dim | [in] - matrix dimension |
Definition at line 338 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::matvec | ( | VecArray & | matVecs, | |
| const MatArray & | inMats, | |||
| const VecArray & | inVecs | |||
| ) | [inline, static] |
Matrix-vector left multiply using multidimensional arrays:
matVec = inMat * inVec.
An array (rank 1, 2 or 3) of "column" vectors, indexed by (D), (i0, D) or (i0, i1, D), is multiplied on the left by an array (rank 2, 3 or 4) of square matrices, indexed by (D, D), (i0, D, D) or (i0, i1, D, D).
| matVec | [out] - matrix-vector product indexed by (D), (i0, D) or (i0, i1, D) | |
| inMat | [in] - the matrix argument indexed by (D, D), (i0, D, D) or (i0, i1, D, D) | |
| inVec | [in] - the vector argument indexed by (D), (i0, D) or (i0, i1, D) |
Definition at line 1172 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::matvec | ( | Scalar * | matVec, | |
| const Scalar * | inMat, | |||
| const Scalar * | inVec, | |||
| const int | dim | |||
| ) | [inline, static] |
Matrix-vector left multiply using contiguous data:
matVec = inMat * inVec.
A single "column" vector inVec of size dim is multiplied on the left by a square matrix inMat of size dim by dim.
| matVec | [out] - matrix-vector product | |
| inMat | [in] - the matrix argument | |
| inVec | [in] - the vector argument | |
| dim | [in] - matrix/vector dimension |
Definition at line 1158 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::scale | ( | ArrayScalar & | inoutScaledArray, | |
| const Scalar | scalar | |||
| ) | [inline, static] |
Multiplies, in place, array inoutScaledArray by the scalar scalar (componentwise):
inoutScaledArray = scalar * inoutScaledArray.
| inoutScaledArray | [in/out] - input/output array | |
| scalar | [in] - multiplier |
Definition at line 1054 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::scale | ( | ArrayScalar & | scaledArray, | |
| const ArrayScalar & | inArray, | |||
| const Scalar | scalar | |||
| ) | [inline, static] |
Multiplies array inArray by the scalar scalar (componentwise):
scaledArray = scalar * inArray.
| scaledArray | [out] - scaled array | |
| inArray | [in] - input array | |
| scalar | [in] - multiplier |
Definition at line 1033 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::scale | ( | Scalar * | inoutScaledArray, | |
| const int | size, | |||
| const Scalar | scalar | |||
| ) | [inline, static] |
Multiplies, in place, contiguous data inoutScaledArray of size size by a scalar (componentwise):
inoutScaledArray = scalar * inoutScaledArray.
| inoutScaledArray | [in/out] - input/scaled array | |
| size | [in] - size of array | |
| scalar | [in] - multiplier |
Definition at line 1023 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::scale | ( | Scalar * | scaledArray, | |
| const Scalar * | inArray, | |||
| const int | size, | |||
| const Scalar | scalar | |||
| ) | [inline, static] |
Multiplies contiguous data inArray of size size by a scalar (componentwise):
scaledArray = scalar * inArray.
| scaledArray | [out] - scaled array | |
| inArray | [in] - input array | |
| size | [in] - size of the input array | |
| scalar | [in] - multiplier |
Definition at line 1014 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::subtract | ( | ArrayScalar & | inoutDiffArray, | |
| const ArrayScalar & | inArray | |||
| ) | [inline, static] |
Subtracts, in place, inArray from inoutDiffArray:
inoutDiffArray = inoutDiffArray - inArray.
| inoutDiffArray | [in/out] - difference/minuend | |
| inArray | [in] - subtrahend |
Definition at line 993 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::subtract | ( | ArrayScalar & | diffArray, | |
| const ArrayScalar & | inArray1, | |||
| const ArrayScalar & | inArray2 | |||
| ) | [inline, static] |
Subtracts inArray2 from inArray1:
diffArray = inArray1 - inArray2.
| diffArray | [out] - difference | |
| inArray1 | [in] - minuend | |
| inArray2 | [in] - subtrahend |
Definition at line 972 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::subtract | ( | Scalar * | inoutDiffArray, | |
| const Scalar * | inArray, | |||
| const int | size | |||
| ) | [inline, static] |
Subtracts, in place, contiguous data inArray from inoutDiffArray of size size:
inoutDiffArray = inoutDiffArray - inArray.
| inoutDiffArray | [in/out] - difference/minuend | |
| inArray | [in] - subtrahend | |
| size | [in] - size of input/output data |
Definition at line 962 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::subtract | ( | Scalar * | diffArray, | |
| const Scalar * | inArray1, | |||
| const Scalar * | inArray2, | |||
| const int | size | |||
| ) | [inline, static] |
Subtracts contiguous data inArray2 from inArray1 of size size:
diffArray = inArray1 - inArray2.
| diffArray | [out] - difference | |
| inArray1 | [in] - minuend | |
| inArray2 | [in] - subtrahend | |
| size | [in] - size of input/output data |
Definition at line 953 of file Intrepid_RealSpaceToolsDef.hpp.
| static void Intrepid::RealSpaceTools< Scalar >::transpose | ( | ArrayScalar & | transposeMats, | |
| const ArrayScalar & | inMats | |||
| ) | [inline, static] |
Computes transposes of square matrices stored in an array of total rank 2 (single matrix), indexed by (D, D), 3 (array of matrices), indexed by (i0, D, D), or 4 (array of arrays of matrices), indexed by (i0, i1, D, D).
| transposeMats | [out] - array of transposes indexed by (D, D), (i0, D, D) or (i0, i1, D, D) | |
| inMats | [in] - array of matrices indexed by (D, D), (i0, D, D) or (i0, i1, D, D) |
| void Intrepid::RealSpaceTools< Scalar >::transpose | ( | Scalar * | transposeMat, | |
| const Scalar * | inMat, | |||
| const int | dim | |||
| ) | [inline, static] |
Computes transpose of the square matrix inMat of size dim by dim.
| transposeMat | [out] - matrix transpose | |
| inMat | [in] - matrix | |
| dim | [in] - matrix dimension |
Definition at line 265 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::vecprod | ( | VecArrayOut & | vecProd, | |
| const VecArrayIn & | inLeft, | |||
| const VecArrayIn & | inRight | |||
| ) | [inline, static] |
Vector product using multidimensional arrays:
vecProd = inVecLeft x inVecRight.
Vector multiplication of two "column" vectors stored in arrays (rank 1, 2, or 3) indexed by (D), (i0, D) or (i0, i1, D).
| vecProd | [in] - vector product indexed by (D), (i0, D) or (i0, i1, D) | |
| inLeft | [in] - left vector argument indexed by (D), (i0, D) or (i0, i1, D) | |
| inRight | [in] - right vector argument indexed by (D), (i0, D) or (i0, i1, D) |
Definition at line 1238 of file Intrepid_RealSpaceToolsDef.hpp.
| void Intrepid::RealSpaceTools< Scalar >::vectorNorm | ( | NormArray & | normArray, | |
| const VecArray & | inVecs, | |||
| const ENorm | normType | |||
| ) | [inline, static] |
Computes norms (1, 2, infinity) of vectors stored in a array of total rank 2 (array of vectors), indexed by (i0, D), or 3 (array of arrays of vectors), indexed by (i0, i1, D).
| normArray | [out] - norm array indexed by (i0) or (i0, i1) | |
| inVecs | [in] - array of vectors indexed by (i0, D) or (i0, i1, D) | |
| normType | [in] - norm type |
Definition at line 165 of file Intrepid_RealSpaceToolsDef.hpp.
| Scalar Intrepid::RealSpaceTools< Scalar >::vectorNorm | ( | const VecArray & | inVec, | |
| const ENorm | normType | |||
| ) | [inline, static] |
Computes norm (1, 2, infinity) of a single vector stored in an array of rank 1.
| inVec | [in] - array representing a single vector | |
| normType | [in] - norm type |
Definition at line 123 of file Intrepid_RealSpaceToolsDef.hpp.
| Scalar Intrepid::RealSpaceTools< Scalar >::vectorNorm | ( | const Scalar * | inVec, | |
| const int | dim, | |||
| const ENorm | normType | |||
| ) | [inline, static] |
Computes norm (1, 2, infinity) of the vector inVec of size dim.
| inVec | [in] - vector | |
| dim | [in] - vector dimension | |
| normType | [in] - norm type |
Definition at line 90 of file Intrepid_RealSpaceToolsDef.hpp.
1.6.1