sytrmd.h

Go to the documentation of this file.
00001 //      LAPACK++ (V. 1.1)
00002 //      (C) 1992-1996 All Rights Reserved.
00003 
00004 
00005 #include "arch.h"
00006 #ifndef _LA_SYMM_TRIDIAG_MAT_DOUBLE_H_
00007 #define _LA_SYMM_TRIDIAG_MAT_DOUBLE_H_
00008 
00009 #include LA_VECTOR_DOUBLE_H
00010 
00011 class DLLIMPORT LaSymmTridiagMatDouble
00012 {   
00013         int size_;
00014         LaVectorDouble d_;          /* main diag */
00015         LaVectorDouble dl_;         /* lower diag */
00016         static double outofbounds_; /* return this address, when addresing 
00017                                         out of bounds */
00018         static int debug_;        // print debug info.
00019         static int *info_;        // print matrix info only, not values
00020                                   //   originally 0, set to 1, and then
00021                                   //   reset to 0 after use.
00022 
00023     public:
00024 
00025         // constructors / destructor
00026     
00027         inline LaSymmTridiagMatDouble();
00028         inline LaSymmTridiagMatDouble(int N);
00029         inline LaSymmTridiagMatDouble(const LaSymmTridiagMatDouble &);
00030         inline ~LaSymmTridiagMatDouble();
00031 
00032         // operators and member functions
00033 
00034                 double& operator()(int i, int j);
00035                 double operator()(int i, int j) const;
00036                 LaVectorDouble diag(int); /* 0 main, -1 lower, 1 upper */
00037                 LaVectorDouble diag(int) const;
00038         inline LaSymmTridiagMatDouble& ref(LaSymmTridiagMatDouble&); 
00039         inline LaSymmTridiagMatDouble& copy(const LaSymmTridiagMatDouble&); 
00040         inline const LaSymmTridiagMatDouble& info() const {
00041             int *t = info_;
00042             *t = 1;
00043             return *this;};
00044         inline int debug() const {    // return debug flag.
00045             return debug_;}
00046         inline int size() const; 
00047 
00048 
00049 
00050         friend DLLIMPORT std::ostream& operator<<(std::ostream&,const LaSymmTridiagMatDouble&);
00051 
00052 
00053 };
00054 
00055 DLLIMPORT std::ostream& operator<<(std::ostream& s, const LaSymmTridiagMatDouble& td);
00056 
00057     // constructors
00058 
00059 inline LaSymmTridiagMatDouble::LaSymmTridiagMatDouble(): 
00060         d_(), dl_()
00061 {
00062     size_ = 0;
00063 }
00064 
00065 inline LaSymmTridiagMatDouble::LaSymmTridiagMatDouble(int N): 
00066         d_(N), dl_(N-1)
00067 {
00068     size_ = N;
00069 }
00070     
00071 inline LaSymmTridiagMatDouble::LaSymmTridiagMatDouble(const LaSymmTridiagMatDouble& td): d_(td.d_), dl_(td.dl_)
00072 {
00073     size_ = td.size_;
00074 }
00075 
00076     // destructor
00077 
00078 inline LaSymmTridiagMatDouble::~LaSymmTridiagMatDouble()
00079 {
00080 }
00081 
00082 
00083     // operators and member functions
00084 
00085 
00086 
00087 inline LaSymmTridiagMatDouble& LaSymmTridiagMatDouble::ref(LaSymmTridiagMatDouble&T) 
00088 {
00089     d_.ref(T.d_);
00090     dl_.ref(T.dl_); 
00091     size_ = T.size_;
00092 
00093     return *this;
00094 }
00095 
00096 
00097 inline LaSymmTridiagMatDouble& LaSymmTridiagMatDouble::copy(const LaSymmTridiagMatDouble&T) 
00098 {
00099     d_.copy(T.d_);
00100     dl_.copy(T.dl_);    
00101     size_ = T.size_;
00102 
00103     return *this;
00104 }
00105 
00106 inline int LaSymmTridiagMatDouble::size() const
00107 {
00108     return size_;
00109 }
00110 
00111 
00112 
00113 #endif 
00114 // _LA_SYMM_TRIDIAG_MAT_DOUBLE_H_

Generated on Sat Jul 14 11:40:36 2007 for Lapack++ by  doxygen 1.5.0