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

drovector.hpp

Go to the documentation of this file.
00001 //=============================================================================
00002 //! double-precision row vector class
00003 class drovector
00004 {
00005 private:
00006   //// objects ////
00007   long L; //!< global vector size (NOT accessible)
00008   long Ll; //!< local vector size (NOT accessible)
00009   long Desc[9]; //!< vector description (NOT accessible)
00010   double* Array; //!< 1D array to store vector data (NOT accessible)
00011   
00012 public:
00013   //// const references ////
00014   long const& l; //!< global vector size (readable)
00015   long const& ll; //!< local vector size (readable)
00016   long* const& desc; //!< vector description (readable)
00017   double* const& array; //!< 1D array to store vector data (readable)
00018 
00019   //// constructor ////
00020   inline drovector();
00021   inline drovector(const drovector&);
00022   inline drovector(const _drovector&);
00023   inline drovector(const long&);
00024   inline ~drovector(); //destructor
00025   
00026   //// io ////
00027   inline CPPSL_double operator()(const long&);
00028   inline double operator()(const long&) const;
00029   inline void set(const long&, const double&) const;
00030   inline friend std::ostream& operator<<(std::ostream&, const drovector&);
00031   
00032   //// calc ////
00033   //inline friend drovector t(const drovector&);
00034   //inline friend double nrm2(const drovector&);
00035   
00036   //// misc ////
00037   inline void clear();
00038   inline void zero();
00039   inline void chsign();
00040   inline void copy(const drovector&);
00041   inline void shallow_copy(const _drovector&);
00042   inline void resize(const long&);
00043   inline friend void swap(drovector&, drovector&);
00044   
00045   //// unary ////
00046   inline friend const drovector& operator+(const drovector&);
00047   inline friend _drovector operator-(const drovector&);
00048   
00049   //// operators with drovector ////
00050   inline drovector& operator=(const drovector&);
00051   inline drovector& operator+=(const drovector&);
00052   inline drovector& operator-=(const drovector&);
00053   //// operators with _drovector ////
00054   inline drovector& operator=(const _drovector&);
00055   inline drovector& operator+=(const _drovector&);
00056   inline drovector& operator-=(const _drovector&);
00057   //// operators with double ////
00058   inline drovector& operator*=(const double&);
00059   inline drovector& operator/=(const double&);
00060   
00061   //// + ////
00062   inline friend _drovector operator+(const  drovector&, const  drovector&);
00063   inline friend _drovector operator+(const  drovector&, const _drovector&);
00064   inline friend _drovector operator+(const _drovector&, const  drovector&);
00065   
00066   //// - ////
00067   inline friend _drovector operator-(const  drovector&, const  drovector&);
00068   inline friend _drovector operator-(const  drovector&, const _drovector&);
00069   inline friend _drovector operator-(const _drovector&, const  drovector&);
00070   
00071   //// * ////
00072   inline friend _drovector operator*(const  drovector&, const  dgematrix&);
00073   inline friend _drovector operator*(const  drovector&, const _dgematrix&);
00074   //inline friend _drovector operator*(const  drovector&, const _dgbmatrix&);
00075   //inline friend _drovector operator*(const  drovector&, const  dgbmatrix&);
00076   
00077   inline friend _drovector operator*(const  drovector&, const     double&);
00078   inline friend _drovector operator*(const     double&, const  drovector&);
00079   
00080   inline friend _dgematrix operator*(const  dcovector&, const  drovector&);
00081   inline friend _dgematrix operator*(const _dcovector&, const  drovector&);
00082   inline friend     double operator*(const  drovector&, const  dcovector&);
00083   inline friend     double operator*(const  drovector&, const _dcovector&);
00084   
00085   //// / ////
00086   inline friend _drovector operator/(const  drovector&, const     double&);
00087 
00088   //// % ////
00089   inline friend     double operator%(const  drovector&, const  drovector&);
00090   inline friend     double operator%(const  drovector&, const _drovector&);
00091   inline friend     double operator%(const _drovector&, const  drovector&);
00092   
00093   //// friend classes ////
00094   friend class  dgematrix;
00095   friend class _dgematrix;
00096   //friend class  dgbmatrix;
00097   //friend class _dgbmatrix;
00098   friend class  dcovector;
00099   friend class _dcovector;
00100   friend class _drovector;
00101 };

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