Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

dblock.h

Go to the documentation of this file.
00001 //****************************************************
00002 //  April, 1993, University of Illinois
00003 // Copyright (C) 1993, 1994 Tianlin Wang
00004 /* Copyright (C) 1994-2003 Matvec Development Team. 
00005 
00006   This program is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Library General Public
00008   License as published by the Free Software Foundation; either
00009   version 2 of the License, or (at your option) any later version.
00010   
00011   This program is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014   Library General Public License for more details.
00015     
00016   You should have received a copy of the GNU Library General Public
00017   License along with this library; if not, write to the Free
00018   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00019   MA 02111-1307, USA 
00020 */
00021 
00022 #ifndef MATVEC_DBLOCK_H
00023 #define MATVEC_DBLOCK_H
00024 
00025 #include <iostream>
00026 #include <vector>
00027 #include "doublematrix.h"
00028 
00029 namespace matvec {
00030  /*!
00031    \class Dblock
00032    \brief This is a array of Matrix
00033 
00034    \sa Array Matrix
00035 */
00036 
00037 class Dblock
00038 {
00039 protected:
00040   int ndim,nrow,ncol;
00041   Vector < doubleMatrix > block;
00042 
00043 public:
00044   int iw; // just a flag
00045   Dblock(void) {ndim=0,nrow=0,ncol=0;}          //Constructor 1
00046   Dblock(int nd, int nr, int nc);               //Constructor 2
00047 
00048   void resize(int nd, int nr, int nc);
00049   void resize (int nd, int nr, int nc, double init);
00050   doubleMatrix & operator[](int i){return block[i];};
00051   double& operator()(int i,int j, int k){return block(i)(j,k);};
00052   int get_ndim(void) {return ndim;}
00053   int get_nrow(void) {return nrow;}
00054   int get_ncol(void) {return ncol;}
00055   void init(double val);
00056   friend std::ostream& operator << (std::ostream &stream, Dblock& D);
00057 }; 
00058 }
00059 
00060 #endif

Generated on Thu Jun 16 17:13:38 2005 for Matvec by doxygen1.2.16