QCMatElemGtr.hpp

Go to the documentation of this file.
00001 //*****************************************************************************//
00002 //                                                                             //
00003 //   Copyright (c) 2001                                                        //
00004 //      INRIA                                                                  //
00005 //      54600 VILLERS LES NANCY                                                //
00006 //      France                                                                 //
00007 //                                                                             //
00008 //*****************************************************************************//
00009 //                                                                             //
00010 //               *** NOTICE OF PROPRIETARY INFORMATION ***                     //
00011 //                                                                             //
00012 // The information contained in this file is considered proprietary and the    //
00013 // exclusive property of  INRIA. This information may not be disclosed,        //
00014 // duplicated or used, in whole or in part, for  any purpose  whatsoever       //
00015 // without express written authorization from INRIA                            //
00016 //                                                                             //
00017 //*****************************************************************************//
00018 
00019 
00020 #ifndef QC_MAT_ELEM_GTR_H_
00021 #define QC_MAT_ELEM_GTR_H_
00022 
00023 
00024 #include "QCCommon.hpp"
00025 #include "QCMemory.hpp"
00026 
00027 
00037 template <class TPMatrix>
00038 class QCMatElemGtr
00039 {
00040 
00042 public:
00043 
00047   QCMatElemGtr (void);
00048 
00049 
00054   QCMatElemGtr (const int & dim);
00055 
00056 
00060   virtual ~QCMatElemGtr (void);
00061 
00062 
00066   TPMatrix& getMatrix (void) { return matrix; }
00067   
00068 
00069 
00073   void    init (void);
00074   
00075 
00076   
00080   void    sizeMatrix (const int& dimMatrix);
00081 
00082 
00083 
00087   bool    allocateMatrix (const int& dimMatrix);
00088 
00089 
00090 
00094   bool    giveBackTmpMem (QCMemory& QCRestrict memoryInst) {
00095     return matrix.giveBackTmpMem(memoryInst) ;
00096   }
00097 
00098 
00099 
00105   template <class TPMatrix2>
00106   void    copyMatrix (QCMatElemGtr<TPMatrix2>& otherGtr) {
00107     matrix.copy(otherGtr.getMatrix() );
00108   }  
00109   
00110 
00111   
00116   QCFloat  trace (void) const { return matrix.trace(); }
00117 
00118 
00119 
00124   template <class TPMatrix2>
00125   QCFloat  traceProduct (QCMatElemGtr<TPMatrix2>& otherGtr) const {
00126     return matrix.traceProduct(otherGtr.getMatrix() );
00127   }
00128 
00129   
00133   QCFloat  deltaElemMax (QCMatElemGtr<TPMatrix>& otherGtr) const {
00134     return matrix.deltaElemMax(otherGtr.getMatrix() );
00135   }
00136   
00137   
00138 
00142   QCFloat  deltaElemMax (TPMatrix &otherMatrix) const {
00143     return matrix.deltaElemMax(otherMatrix );
00144   }
00145 
00146 
00147 
00152   template <class TPManager>
00153   void          writeTransEigenvectMatrix (TPManager&           managerInst,
00154                                            const string&        resultFileName) const;
00155 
00156 
00158 protected:
00159 
00160 
00162 private:
00163 
00164 
00167 public:
00168 protected:
00169 
00175   TPMatrix    matrix;
00176   
00177 private:
00178 
00179 };
00180 
00181 #endif // QC_MAT_ELEM_GTR_H_

Generated on Sat Jan 28 21:07:28 2006 for QC++ by  doxygen 1.4.4