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 <complex>
00017 #include <dlrCommon/types.h>
00018 #include <dlrNumeric/array1D.h>
00019 #include <dlrNumeric/array2D.h>
00020 
00021 namespace dlr {
00022 
00023   namespace linearAlgebra {
00024 
00042     void
00043     choleskyFactorization(const Array2D<Float64>& inputArray,
00044                           Array2D<Float64>& kArray,
00045                           bool isUpperTriangular = true);
00046 
00047     
00057     Float64
00058     determinant(const Array2D<Float64>& A);
00059 
00060 
00073     Array1D<Float64>
00074     eigenvaluesSymmetric(const Array2D<Float64>& inputArray);
00075 
00076 
00100     void
00101     eigenvectors(const Array2D<Float64>& inputArray,
00102                  Array1D< std::complex<Float64> >& eigenvalues,
00103                  Array2D< std::complex<Float64> >& eigenvectors,
00104                  bool isSortRequired = false);
00105 
00106     
00127     void
00128     eigenvectorsSymmetric(const Array2D<Float64>& inputArray,
00129                           Array1D<Float64>& eigenvalues,
00130                           Array2D<Float64>& eigenvectors);
00131 
00132   
00142     Array2D<Float64>
00143     inverse(const Array2D<Float64>& A);
00144 
00145   
00165     std::pair<Float64, Float64>
00166     linearFit(const Array1D<Float64>& array0,
00167               const Array1D<Float64>& array1);
00168 
00169   
00187     Array1D<Float64>
00188     linearLeastSquares(const Array2D<Float64>& A, const Array1D<Float64>& b);
00189 
00190 
00204     void
00205     linearSolveInPlace(Array2D<Float64>& A, Array1D<Float64>& b);
00206 
00207 
00222     void
00223     linearSolveInPlace(Array2D<Float64>& A, Array2D<Float64>& b);
00224   
00225 
00250     Array1D<Float64>
00251     linearSolveTridiagonal(const Array1D<Float64>& subDiagonal,
00252                            const Array1D<Float64>& centerDiagonal,
00253                            const Array1D<Float64>& superDiagonal,
00254                            const Array1D<Float64>& bVector);
00255   
00256     
00268     Array2D<Float64>
00269     pseudoinverse(const Array2D<Float64>& A);
00270 
00271 
00292     void
00293     qrFactorization(const Array2D<Float64>& inputArray,
00294                     Array2D<Float64>& qArray,
00295                     Array2D<Float64>& rArray);
00296 
00297     
00343     void
00344     singularValueDecomposition(const Array2D<Float64>& inputArray,
00345                                Array2D<Float64>& uArray,
00346                                Array1D<Float64>& sigmaArray,
00347                                Array2D<Float64>& vTransposeArray,
00348                                bool isNullSpaceRequired=false,
00349                                bool isFullRangeRequired=false);
00350 
00351   
00362     Array1D<Float64>
00363     singularValues(const Array2D<Float64>& inputArray);
00364   
00365   } // namespace linearAlgebra
00366   
00367 } // namespace dlr
00368 
00369 
00370 /* ======= Declarations to maintain compatibility with legacy code. ======= */
00371 
00372 namespace dlr {
00373 
00374   using linearAlgebra::determinant;
00375   using linearAlgebra::eigenvaluesSymmetric;
00376   using linearAlgebra::eigenvectorsSymmetric;
00377   using linearAlgebra::inverse;
00378   using linearAlgebra::linearFit;
00379   using linearAlgebra::linearLeastSquares;
00380   using linearAlgebra::linearSolveInPlace;
00381   using linearAlgebra::linearSolveTridiagonal;
00382   using linearAlgebra::pseudoinverse;
00383   using linearAlgebra::singularValueDecomposition;
00384   using linearAlgebra::singularValues;
00385   
00386 } // namespace dlr
00387 
00388 #endif // #ifndef _DLR_LINEARALGEBRA_LINEARALGEBRA_H_

Generated on Wed Nov 25 00:49:58 2009 for dlrLinearAlgebra Utility Library by  doxygen 1.5.8