CPPLapack
 All Classes Files Functions Variables Friends
_zgsmatrix.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 //! (DO NOT USE) Smart-temporary Real Double-precision General Sparse Matrix Class
00003 class _zgsmatrix
00004 {
00005 public:
00006   ///////////////////////////////////////////////
00007   /////////////////// objects ///////////////////
00008   ///////////////////////////////////////////////
00009   mutable long m; //!< matrix row size
00010   mutable long n; //!< matrix column size
00011   mutable std::vector<zcomponent> data; //!< matrix data
00012   mutable std::vector< std::vector<uint32_t> > rows; //!< array of vector to store the entry information of component for each row
00013   mutable std::vector< std::vector<uint32_t> > cols; //!< array of vector to store the entry information of component for each column
00014   
00015   ///////////////////////////////////////////////
00016   ///////////////// constructors ////////////////
00017   ///////////////////////////////////////////////
00018   inline _zgsmatrix();
00019   inline _zgsmatrix(const _zgsmatrix&);
00020   inline ~_zgsmatrix(); //destructor
00021   
00022   ///////////////////////////////////////////////
00023   ////////////////// functions //////////////////
00024   ///////////////////////////////////////////////
00025   //////// cast ////////
00026   inline _zgematrix to_zgematrix() const;
00027   
00028   //////// io ////////
00029   inline comple operator()(const long&, const long&) const;//not return comple&
00030   inline friend std::ostream& operator<<(std::ostream&, const _zgsmatrix&);
00031   inline void write(const char*) const;
00032   
00033   //////// misc ////////
00034   inline void nullify() const;
00035   inline void destroy() const;
00036   
00037   //////// calc ////////
00038   inline friend _zgsmatrix t(const zgsmatrix&);
00039   inline friend void idamax(long&, long&, const zgsmatrix&);
00040   inline friend comple damax(const zgsmatrix&);
00041   
00042   ///////////////////////////////////////////////
00043   ///////////// numerical operators /////////////
00044   ///////////////////////////////////////////////
00045   //////// unary ////////
00046   inline friend const _zgsmatrix& operator+(const _zgsmatrix&);
00047   inline friend _zgsmatrix operator-(const _zgsmatrix&);
00048   
00049   //////// + ////////
00050   inline friend _zgematrix operator+(const _zgsmatrix&, const  zgematrix&);
00051   inline friend _zgematrix operator+(const _zgsmatrix&, const _zgematrix&);
00052   inline friend _zgematrix operator+(const _zgsmatrix&, const  zhematrix&);
00053   inline friend _zgematrix operator+(const _zgsmatrix&, const _zhematrix&);
00054   inline friend _zgematrix operator+(const _zgsmatrix&, const  zgbmatrix&);
00055   inline friend _zgematrix operator+(const _zgsmatrix&, const _zgbmatrix&);
00056   inline friend _zgsmatrix operator+(const _zgsmatrix&, const  zgsmatrix&);
00057   inline friend _zgsmatrix operator+(const _zgsmatrix&, const _zgsmatrix&);
00058   inline friend _zgsmatrix operator+(const _zgsmatrix&, const  zhsmatrix&);
00059   inline friend _zgsmatrix operator+(const _zgsmatrix&, const _zhsmatrix&);
00060   
00061   //////// - ////////
00062   inline friend _zgematrix operator-(const _zgsmatrix&, const  zgematrix&);
00063   inline friend _zgematrix operator-(const _zgsmatrix&, const _zgematrix&);
00064   inline friend _zgematrix operator-(const _zgsmatrix&, const  zhematrix&);
00065   inline friend _zgematrix operator-(const _zgsmatrix&, const _zhematrix&);
00066   inline friend _zgematrix operator-(const _zgsmatrix&, const  zgbmatrix&);
00067   inline friend _zgematrix operator-(const _zgsmatrix&, const _zgbmatrix&);
00068   inline friend _zgsmatrix operator-(const _zgsmatrix&, const  zgsmatrix&);
00069   inline friend _zgsmatrix operator-(const _zgsmatrix&, const _zgsmatrix&);
00070   inline friend _zgsmatrix operator-(const _zgsmatrix&, const  zhsmatrix&);
00071   inline friend _zgsmatrix operator-(const _zgsmatrix&, const _zhsmatrix&);
00072   
00073   //////// * ////////
00074   inline friend _zcovector operator*(const _zgsmatrix&, const  zcovector&);
00075   inline friend _zcovector operator*(const _zgsmatrix&, const _zcovector&);
00076   inline friend _zgematrix operator*(const _zgsmatrix&, const  zgematrix&);
00077   inline friend _zgematrix operator*(const _zgsmatrix&, const _zgematrix&);
00078   inline friend _zgematrix operator*(const _zgsmatrix&, const  zhematrix&);
00079   inline friend _zgematrix operator*(const _zgsmatrix&, const _zhematrix&);
00080   inline friend _zgematrix operator*(const _zgsmatrix&, const  zgbmatrix&);
00081   inline friend _zgematrix operator*(const _zgsmatrix&, const _zgbmatrix&);
00082   inline friend _zgsmatrix operator*(const _zgsmatrix&, const  zgsmatrix&);
00083   inline friend _zgsmatrix operator*(const _zgsmatrix&, const _zgsmatrix&);
00084   inline friend _zgsmatrix operator*(const _zgsmatrix&, const  zhsmatrix&);
00085   inline friend _zgsmatrix operator*(const _zgsmatrix&, const _zhsmatrix&);
00086   inline friend _zgsmatrix operator*(const _zgsmatrix&, const     double&);
00087   inline friend _zgsmatrix operator*(const _zgsmatrix&, const     comple&);
00088   
00089   //////// / ////////
00090   inline friend _zgsmatrix operator/(const _zgsmatrix&, const     double&);
00091   inline friend _zgsmatrix operator/(const _zgsmatrix&, const     comple&);
00092   
00093   //////// double, complex ////////
00094   inline friend _zgsmatrix operator*(const     double&, const _zgsmatrix&);
00095   inline friend _zgsmatrix operator*(const     comple&, const _zgsmatrix&);
00096 };
 All Classes Files Functions Variables Friends