Department of Scientific Computing   
Institute for Numerical Simulation   
University of Bonn   
Documentation
Download
Programming References
Bug Reports / Suggestions
FAQ
Authors
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Matrix2D.hpp

00001 #ifndef MATRIX_HPP
00002 # define MATRIX_HPP
00003 
00004 #include <stdio.h>
00005 #include <assert.h>
00006 #include <math.h>
00007 #include <iostream>
00008 using namespace std;
00009 
00010 #include "Math.hpp"
00011 
00012 class Matrix2D {
00013  
00014 public:
00015   double **a     ;
00016   int    size[2] ;
00017 
00018   Matrix2D() ;
00019   Matrix2D(const int s0,const int s1) ;
00020  ~Matrix2D() ;
00021 
00022   void Init(const int s0,const int s1) ;
00023  
00024   double& operator[](const int *const i) const { return  a[i[0]][i[1]] ; }
00025 
00026   void Print () const      ;
00027   void Read  (FILE *fid)   ;
00028   void Copy  (Matrix2D *B) ;
00029   void Mirror(Matrix2D *B) ;
00030 
00031   // (*W) = (*this) * (*V)
00032   void MatVec       (double *const V,double *const W) const;
00033   void MatTVec      (double *const V,double *const W) const;
00034   
00035   // (*W) = a*(*W) + b*(*this) * (*V)
00036   void APlusBMatVec (const double a,const double b,double *const V,double *const W) const;
00037   void APlusBMatTVec(const double a,const double b,double *const V,double *const W) const;
00038 
00039   void AdaptiveAPlusBMatVec (const double a,const double b,double *const V,double *const W,int i0,int i1) const;
00040   void AdaptiveAPlusBMatTVec(const double a,const double b,double *const V,double *const W,int i0,int i1) const;
00041 } ;
00042 
00043 #endif

Generated at Mon Aug 19 10:02:31 2002 for AWFD by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001