Main Page | Class List | File List | Class Members | File Members | Related Pages

dgematrix.hpp

Go to the documentation of this file.
00001 //=============================================================================
00002 //! double-precision general matrix class
00003 class dgematrix
00004 {
00005 private:
00006   //// objects ////
00007   long M; //!< global matrix row size (NOT accessible)
00008   long N; //!< global matrix column size (NOT accessible)
00009   long Ml; //!< local matrix row size (NOT accessible)
00010   long Nl; //!< local matrix column size (NOT accessible)
00011   long Desc[9]; //!< matrix description (NOT accessible)
00012   double* Array; //!< 1D array to store matrix data (NOT accessible)
00013   
00014 public:
00015   //// const reference ////
00016   long const& m; //!< global matrix row size (readable)
00017   long const& n; //!< global matrix column size (readable)
00018   long const& ml; //!< local matrix row size (readable)
00019   long const& nl; //!< local matrix column size (readable)
00020   long* const& desc; //!< matrix description (readable)
00021   double* const& array; //!< 1D array to store matrix data (readable)
00022   
00023   //// constructor ////
00024   inline dgematrix();
00025   inline dgematrix(const dgematrix&);
00026   inline dgematrix(const _dgematrix&);
00027   //inline dgematrix(const dgbmatrix&);
00028   //inline dgematrix(const _dgbmatrix&);
00029   inline dgematrix(const long&, const long&);
00030   inline ~dgematrix(); //destructor
00031   
00032   //// io ////
00033   inline CPPSL_double operator()(const long&, const long&);
00034   inline double operator()(const long&, const long&) const;
00035   inline void set(const long&, const long&, const double&) const;
00036   inline friend std::ostream& operator<<(std::ostream&, const dgematrix&);
00037   
00038   //// misc ////
00039   inline void clear();
00040   inline void zero();
00041   inline void identity();
00042   inline void chsign();
00043   inline void copy(const dgematrix&);
00044   inline void shallow_copy(const _dgematrix&);
00045   inline void resize(const long&, const long&);
00046   inline friend void swap(dgematrix&, dgematrix&);
00047   
00048   //// calc ////
00049   inline void transpose();
00050   inline friend _dgematrix t(const dgematrix&);
00051   //inline friend _dgematrix i(dgematrix);
00052   //inline friend void idamax(long&, long&, const dgematrix&);
00053   //inline friend double damax(const dgematrix&);
00054 
00055   //// lapack ////
00056   inline long dgesv(dgematrix&);
00057   inline long dgesv(dcovector&);
00058   //inline long dgels(dgematrix&);
00059   //inline long dgels(dcovector&);
00060   //inline long dgelss(dcovector&, dcovector&, long, double);
00061   //inline long dgeev(dcovector&, dcovector&, dgematrix&);
00062   //inline long dgeev(drovector&, drovector&, dgematrix&);
00063   //inline long dgesvd(dcovector&, dgematrix&, dgematrix&);
00064   
00065   //// unary ////
00066   inline friend const dgematrix& operator+(const dgematrix&);
00067   inline friend _dgematrix operator-(const dgematrix&);
00068   
00069   //// operators with dgematrix ////
00070   inline dgematrix& operator=(const dgematrix&);
00071   inline dgematrix& operator+=(const dgematrix&);
00072   inline dgematrix& operator-=(const dgematrix&);
00073   inline dgematrix& operator*=(const dgematrix&);
00074   //// operators with _dgematrix ////
00075   inline dgematrix& operator=(const _dgematrix&);
00076   inline dgematrix& operator+=(const _dgematrix&);
00077   inline dgematrix& operator-=(const _dgematrix&);
00078   inline dgematrix& operator*=(const _dgematrix&);
00079   //// operators with dgbmatrix ////
00080   //inline dgematrix& operator=(const dgbmatrix&);
00081   //inline dgematrix& operator+=(const dgbmatrix&);
00082   //inline dgematrix& operator-=(const dgbmatrix&);
00083   //inline dgematrix& operator*=(const dgbmatrix&);
00084   //// operators with _dgbmatrix ////
00085   //inline dgematrix& operator=(const _dgbmatrix&);
00086   //inline dgematrix& operator+=(const _dgbmatrix&);
00087   //inline dgematrix& operator-=(const _dgbmatrix&);
00088   //inline dgematrix& operator*=(const _dgbmatrix&);
00089   //// operators with double ////
00090   inline dgematrix& operator*=(const double&);
00091   inline dgematrix& operator/=(const double&);
00092 
00093   //// + ////
00094   inline friend _dgematrix operator+(const  dgematrix&, const  dgematrix&);
00095   inline friend _dgematrix operator+(const  dgematrix&, const _dgematrix&);
00096   inline friend _dgematrix operator+(const _dgematrix&, const  dgematrix&);
00097   
00098   //inline friend _dgematrix operator+(const  dgematrix&, const  dgbmatrix&);
00099   //inline friend _dgematrix operator+(const  dgematrix&, const _dgbmatrix&);
00100   //inline friend _dgematrix operator+(const  dgbmatrix&, const  dgematrix&);
00101   //inline friend _dgematrix operator+(const _dgbmatrix&, const  dgematrix&);
00102   
00103   //// - ////
00104   inline friend _dgematrix operator-(const  dgematrix&, const  dgematrix&);
00105   inline friend _dgematrix operator-(const  dgematrix&, const _dgematrix&);
00106   inline friend _dgematrix operator-(const _dgematrix&, const  dgematrix&);
00107   
00108   //inline friend _dgematrix operator-(const  dgematrix&, const  dgbmatrix&);
00109   //inline friend _dgematrix operator-(const  dgematrix&, const _dgbmatrix&);
00110   //inline friend _dgematrix operator-(const  dgbmatrix&, const  dgematrix&);
00111   //inline friend _dgematrix operator-(const _dgbmatrix&, const  dgematrix&);
00112   
00113   //// * ////
00114   inline friend _dgematrix operator*(const  dgematrix&, const  dgematrix&);
00115   inline friend _dgematrix operator*(const  dgematrix&, const _dgematrix&);
00116   inline friend _dgematrix operator*(const _dgematrix&, const  dgematrix&);
00117   
00118   //inline friend _dgematrix operator*(const  dgematrix&, const  dgbmatrix&);
00119   //inline friend _dgematrix operator*(const  dgematrix&, const _dgbmatrix&);  
00120   //inline friend _dgematrix operator*(const  dgbmatrix&, const  dgematrix&);
00121   //inline friend _dgematrix operator*(const _dgbmatrix&, const  dgematrix&);
00122   
00123   inline friend _dcovector operator*(const  dgematrix&, const  dcovector&);
00124   inline friend _dcovector operator*(const  dgematrix&, const _dcovector&);
00125   
00126   inline friend _drovector operator*(const  drovector&, const  dgematrix&);
00127   inline friend _drovector operator*(const _drovector&, const  dgematrix&);
00128   
00129   inline friend _dgematrix operator*(const  dgematrix&, const     double&);
00130   inline friend _dgematrix operator*(const     double&, const  dgematrix&);
00131   
00132   //// / ////
00133   inline friend _dgematrix operator/(const  dgematrix&, const     double&);
00134 
00135   //// friend classes ////
00136   friend class _dgematrix;
00137   //friend class  dgbmatrix;
00138   //friend class _dgbmatrix;
00139   friend class  dcovector;
00140   friend class _dcovector;
00141   friend class  drovector;
00142   friend class _drovector;
00143 };

Generated on Sat Jan 31 19:25:44 2004 for CPPScaLapack by doxygen 1.3.5