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

dcovector.hpp

Go to the documentation of this file.
00001 //=============================================================================
00002 //! double-precision column vector class
00003 class dcovector
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   //// objects ////
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 dcovector();
00021   inline dcovector(const dcovector&);
00022   inline dcovector(const _dcovector&);
00023   inline dcovector(const long&);
00024   inline ~dcovector(); //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 dcovector&);
00031   
00032   //// calc ////
00033   //inline friend drovector t(const dcovector&);
00034   //inline friend double nrm2(const dcovector&);
00035   
00036   //// misc ////
00037   inline void clear();
00038   inline void zero();
00039   inline void chsign();
00040   inline void copy(const dcovector&);
00041   inline void shallow_copy(const _dcovector&);
00042   inline void resize(const long&);
00043   inline friend void swap(dcovector&, dcovector&);
00044   
00045   //// unary ////
00046   inline friend const dcovector& operator+(const dcovector&);
00047   inline friend _dcovector operator-(const dcovector&);
00048   
00049   //// operators with dcovector ////
00050   inline dcovector& operator=(const dcovector&);
00051   inline dcovector& operator+=(const dcovector&);
00052   inline dcovector& operator-=(const dcovector&);
00053   //// operators with _dcovector ////
00054   inline dcovector& operator=(const _dcovector&);
00055   inline dcovector& operator+=(const _dcovector&);
00056   inline dcovector& operator-=(const _dcovector&);
00057   //// operators with double ////
00058   inline dcovector& operator*=(const double&);
00059   inline dcovector& operator/=(const double&);
00060 
00061   //// + ////
00062   inline friend _dcovector operator+(const  dcovector&, const  dcovector&);
00063   inline friend _dcovector operator+(const  dcovector&, const _dcovector&);
00064   inline friend _dcovector operator+(const _dcovector&, const  dcovector&);
00065   
00066   //// - ////
00067   inline friend _dcovector operator-(const  dcovector&, const  dcovector&);
00068   inline friend _dcovector operator-(const  dcovector&, const _dcovector&);
00069   inline friend _dcovector operator-(const _dcovector&, const  dcovector&);
00070   
00071   //// * ////
00072   inline friend _dcovector operator*(const  dgematrix&, const  dcovector&);
00073   inline friend _dcovector operator*(const _dgematrix&, const  dcovector&);
00074   //inline friend _dcovector operator*(const  dgbmatrix&, const  dcovector&);
00075   //inline friend _dcovector operator*(const _dgbmatrix&, const  dcovector&);
00076   
00077   inline friend _dgematrix operator*(const  dcovector&, const _drovector&);
00078   inline friend _dgematrix operator*(const  dcovector&, const  drovector&);
00079   
00080   inline friend _dcovector operator*(const     double&, const  dcovector&);
00081   inline friend _dcovector operator*(const  dcovector&, const     double&);
00082   
00083   inline friend     double operator*(const _drovector&, const  dcovector&);
00084   inline friend     double operator*(const  drovector&, const  dcovector&);
00085   
00086   //// / ////
00087   inline friend _dcovector operator/(const  dcovector&, const     double&);
00088   
00089   //// % ////
00090   inline friend     double operator%(const  dcovector&, const  dcovector&);
00091   inline friend     double operator%(const  dcovector&, const _dcovector&);
00092   inline friend     double operator%(const _dcovector&, const  dcovector&);
00093   
00094   //// friend class ////
00095   friend class  dgematrix;
00096   friend class _dgematrix;
00097   //friend class  dgbmatrix;
00098   //friend class _dgbmatrix;
00099   friend class _dcovector;
00100   friend class  drovector;
00101   friend class _drovector;  
00102 };

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