linearAlgebra.h

Go to the documentation of this file.
00001 
00013 #ifndef _DLR_LINEARALGEBRA_LINEARALGEBRA_H_
00014 #define _DLR_LINEARALGEBRA_LINEARALGEBRA_H_
00015 
00016 #include <dlrCommon/types.h>
00017 #include <dlrNumeric/array1D.h>
00018 #include <dlrNumeric/array2D.h>
00019 
00020 namespace dlr {
00021 
00022   namespace linearAlgebra {
00023 
00041     void
00042     choleskyFactorization(const Array2D<Float64>& inputArray,
00043                           Array2D<Float64>& kArray,
00044                           bool isUpperTriangular = true);
00045 
00046     
00056     Float64
00057     determinant(const Array2D<Float64>& A);
00058 
00059 
00072     Array1D<Float64>
00073     eigenvaluesSymmetric(const Array2D<Float64>& inputArray);
00074 
00075 
00096     void
00097     eigenvectorsSymmetric(const Array2D<Float64>& inputArray,
00098                           Array1D<Float64>& eigenvalues,
00099                           Array2D<Float64>& eigenvectors);
00100 
00101   
00111     Array2D<Float64>
00112     inverse(const Array2D<Float64>& A);
00113 
00114   
00134     std::pair<Float64, Float64>
00135     linearFit(const Array1D<Float64>& array0,
00136               const Array1D<Float64>& array1);
00137 
00138   
00156     Array1D<Float64>
00157     linearLeastSquares(const Array2D<Float64>& A, const Array1D<Float64>& b);
00158 
00159 
00173     void
00174     linearSolveInPlace(Array2D<Float64>& A, Array1D<Float64>& b);
00175 
00176 
00191     void
00192     linearSolveInPlace(Array2D<Float64>& A, Array2D<Float64>& b);
00193   
00194 
00219     Array1D<Float64>
00220     linearSolveTridiagonal(const Array1D<Float64>& subDiagonal,
00221                            const Array1D<Float64>& centerDiagonal,
00222                            const Array1D<Float64>& superDiagonal,
00223                            const Array1D<Float64>& bVector);
00224   
00225     
00237     Array2D<Float64>
00238     pseudoinverse(const Array2D<Float64>& A);
00239 
00240 
00266     void
00267     singularValueDecomposition(const Array2D<Float64>& inputArray,
00268                                Array2D<Float64>& uArray,
00269                                Array1D<Float64>& sigmaArray,
00270                                Array2D<Float64>& vTransposeArray);
00271 
00272   
00283     Array1D<Float64>
00284     singularValues(const Array2D<Float64>& inputArray);
00285   
00286   } // namespace linearAlgebra
00287   
00288 } // namespace dlr
00289 
00290 
00291 /* ======= Declarations to maintain compatibility with legacy code. ======= */
00292 
00293 namespace dlr {
00294 
00295   using linearAlgebra::determinant;
00296   using linearAlgebra::eigenvaluesSymmetric;
00297   using linearAlgebra::eigenvectorsSymmetric;
00298   using linearAlgebra::inverse;
00299   using linearAlgebra::linearFit;
00300   using linearAlgebra::linearLeastSquares;
00301   using linearAlgebra::linearSolveInPlace;
00302   using linearAlgebra::linearSolveTridiagonal;
00303   using linearAlgebra::pseudoinverse;
00304   using linearAlgebra::singularValueDecomposition;
00305   using linearAlgebra::singularValues;
00306   
00307 } // namespace dlr
00308 
00309 #endif // #ifndef _DLR_LINEARALGEBRA_LINEARALGEBRA_H_

Generated on Tue Jan 6 22:59:48 2009 for dlrLinearAlgebra Utility Library by  doxygen 1.5.6