Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

DenseGenMatrix.hh

Go to the documentation of this file.
00001 #ifndef DENSEGENMATRIX
00002 #define DENSEGENMATRIX
00003 
00016 #include "GenMatrix.hh"
00017 #include "IotrRefCount.hh" 
00018 #include "SimpleArrayData.hh"
00019 #include "ElementGatherSeq.hh"
00020 #include "IotrHandle.hh"
00021 
00026 class DenseGenMatrix : public GenMatrix {
00027 protected:
00029   SimpleArrayDataHandle data;
00032   double ** mMat;
00033   int mLeadingDimension;
00034   int mRows;
00035   int mCols;
00036   /* my changes */
00037 
00038   // Disable C++ value semantics (is this necessary?)
00039   DenseGenMatrix() : data(), mMat(0),
00040                      mLeadingDimension(0), mRows(0), mCols(0) {};
00041 public:
00042   DenseGenMatrix( int m, int n);
00043   DenseGenMatrix( double * v, int m, int n);
00044   virtual ~DenseGenMatrix();
00045 
00046   double * operator[]( int i ) { return mMat[i]; }
00047   const double * operator[]( int i ) const { return mMat[i]; }
00048  
00049   double * elements() { return mMat[0]; };
00050   const double * elements() const { return mMat[0]; };
00051   double **Mat() { return mMat; };
00052   const double * const *Mat () const { return mMat; };
00053   int leadingDimension() const { return mLeadingDimension; };
00054 
00056   virtual int rows() const;
00058   virtual int columns() const;
00060   virtual void clearRange( int istart, int jstart,
00061                            int iextent, int jextent );
00071   virtual void writefToStream( std::ostream& out,
00072                                const char format[] ) const;
00074   virtual void mult( double alpha, const IotrVector & x,
00075                      double beta,  IotrVector & y ) const;
00076 
00077   virtual void filteredMult( double alpha, const ElementGather & filter,
00078                              const IotrVector & x,
00079                              double beta,  IotrVector & y ) const;
00081   virtual void transposeMult( double alpha, const IotrVector & x,
00082                               double beta,  IotrVector & y ) const;
00084   virtual void filteredTransposeMult( double alpha, const IotrVector & x,
00085                                       double beta,  const ElementGather& filt,
00086                                       IotrVector & y ) const;
00090 //   virtual void multSelect( double alpha, IotrVector & x,
00091 //                         double beta, IotrVector & y,
00092 //                         ElementGatherSeq & iequality);
00093   virtual void copyFromSparseCols( const int irow[], const int kcol[],
00094                                    const double M[] );
00095   virtual void copyToSparseCols( int irow[], int len, 
00096                                  int kcol[], double M[],
00097                                  int & morei ) const;
00098   virtual void inspect( const char * name = 0,
00099                         const char * filename = 0) const;
00100   virtual void inspectAsMatlab( const char * name = 0,
00101                                 const char * filename = 0) const;
00102 };
00103 
00104 typedef Handle<DenseGenMatrix> DenseGenMatrixHandle;
00105 
00110 #endif

Generated on Wed Aug 27 10:03:41 2003 for iotr by doxygen1.2.18