auxlib_proto.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2010 NICTA and the authors listed below
00002 // http://nicta.com.au
00003 // 
00004 // Authors:
00005 // - Conrad Sanderson (conradsand at ieee dot org)
00006 // - Edmund Highcock (edmund dot highcock at merton dot ox dot ac dot uk)
00007 // 
00008 // This file is part of the Armadillo C++ library.
00009 // It is provided without any warranty of fitness
00010 // for any purpose. You can redistribute this file
00011 // and/or modify it under the terms of the GNU
00012 // Lesser General Public License (LGPL) as published
00013 // by the Free Software Foundation, either version 3
00014 // of the License or (at your option) any later version.
00015 // (see http://www.opensource.org/licenses for more info)
00016 
00017 
00018 //! \addtogroup auxlib
00019 //! @{
00020 
00021 
00022 //! wrapper for accessing external functions defined in ATLAS, LAPACK or BLAS libraries
00023 class auxlib
00024   {
00025   public:
00026   
00027   //
00028   // inv
00029   
00030   template<typename eT>
00031   inline static bool inv_noalias(Mat<eT>& out, const Mat<eT>& X);
00032   
00033   template<typename eT>
00034   inline static bool inv_inplace(Mat<eT>& X);
00035   
00036   
00037   //
00038   // det
00039   
00040   template<typename eT>
00041   inline static eT det(const Mat<eT>& X);
00042   
00043   template<typename eT>
00044   inline static void log_det(eT& out_val, typename get_pod_type<eT>::result& out_sign, const Mat<eT>& X);
00045   
00046   
00047   //
00048   // lu
00049   
00050   template<typename eT>
00051   inline static void lu(Mat<eT>& L, Mat<eT>& U, podarray<int>& ipiv, const Mat<eT>& X_orig);
00052   
00053   template<typename eT>
00054   inline static void lu(Mat<eT>& L, Mat<eT>& U, Mat<eT>& P, const Mat<eT>& X);
00055   
00056   template<typename eT>
00057   inline static void lu(Mat<eT>& L, Mat<eT>& U, const Mat<eT>& X);
00058   
00059   
00060   //
00061   // eig
00062   
00063   template<typename eT> 
00064   inline static void eig_sym(Col<eT>& eigval, const Mat<eT>& A);
00065   
00066   template<typename T> 
00067   inline static void eig_sym(Col<T>& eigval, const Mat< std::complex<T> >& A);
00068 
00069   template<typename eT>
00070   inline static void eig_sym(Col<eT>& eigval, Mat<eT>& eigvec, const Mat<eT>& A);
00071   
00072   template<typename T>
00073   inline static void eig_sym(Col<T>& eigval, Mat< std::complex<T> >& eigvec, const Mat< std::complex<T> >& A);
00074 
00075   template<typename eT>
00076   inline static void eig_gen(Col< std::complex<eT> >& eigval, Mat<eT>& l_eigvec, Mat<eT>& r_eigvec, const Mat<eT>& A, const char side);
00077 
00078   template<typename T>
00079   inline static void eig_gen(Col< std::complex<T> >& eigval, Mat< std::complex<T> >& l_eigvec, Mat< std::complex<T> >& r_eigvec, const Mat< std::complex<T> >& A, const char side);
00080   
00081   //
00082   // chol
00083   
00084   template<typename eT>
00085   inline static bool chol(Mat<eT>& out, const Mat<eT>& X);
00086   
00087   
00088   //
00089   // qr
00090   
00091   template<typename eT>
00092   inline static bool qr(Mat<eT>& Q, Mat<eT>& R, const Mat<eT>& X);
00093   
00094   
00095   //
00096   // svd
00097   
00098   template<typename eT>
00099   inline static bool svd(Col<eT>& S, const Mat<eT>& X);
00100   
00101   template<typename T>
00102   inline static bool svd(Col<T>& S, const Mat< std::complex<T> >& X);
00103   
00104   template<typename eT>
00105   inline static bool svd(Mat<eT>& U, Col<eT>& S, Mat<eT>& V, const Mat<eT>& X);
00106   
00107   template<typename T>
00108   inline static bool svd(Mat< std::complex<T> >& U, Col<T>& S, Mat< std::complex<T> >& V, const Mat< std::complex<T> >& X);
00109   
00110   
00111   // solve
00112   
00113   template<typename eT>
00114   inline static bool solve(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B);
00115   
00116   template<typename eT>
00117   inline static bool solve_od(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B);
00118   
00119   template<typename eT>
00120   inline static bool solve_ud(Mat<eT>& out, const Mat<eT>& A, const Mat<eT>& B);
00121   
00122   };
00123 
00124 
00125 //! @}