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

array.h

00001 //
00002 // array.h
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@limitpt.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifdef __GNUC__
00029 #pragma interface
00030 #endif
00031 
00032 #ifndef _chemistry_qc_intv3_array_h
00033 #define _chemistry_qc_intv3_array_h
00034 
00035 #include <iostream>
00036 
00037 class IntV3Arraydouble2 {
00038   private:
00039     int n1_, n2_;
00040     double **data_;
00041   public:
00042     IntV3Arraydouble2();
00043     ~IntV3Arraydouble2();
00044     void set_dim(int n1, int n2);
00045     double &operator()(int i,int j) { return data_[i][j]; }
00046     void print(std::ostream &);
00047     int nbyte() const;
00048 };
00049 
00050 class IntV3Arraydouble3 {
00051   private:
00052     int n1_, n2_, n3_;
00053     double ***data_;
00054   public:
00055     IntV3Arraydouble3();
00056     ~IntV3Arraydouble3();
00057     void set_dim(int n1, int n2, int n3);
00058     double *operator()(int i,int j) { return data_[i][j]; }
00059     double &operator()(int i,int j,int k) { return data_[i][j][k]; }
00060     void print(std::ostream &);
00061     int nbyte() const;
00062 };
00063 
00064 class IntV3Arraydoublep2 {
00065   private:
00066     int n1_, n2_;
00067     double ***data_;
00068   public:
00069     IntV3Arraydoublep2();
00070     ~IntV3Arraydoublep2();
00071     void set_dim(int n1, int n2);
00072     double *&operator()(int i,int j) { return data_[i][j]; }
00073     void print(std::ostream &);
00074     int nbyte() const;
00075 };
00076 
00077 class IntV3Arraydoublep3 {
00078   private:
00079     int n1_, n2_, n3_;
00080     double ****data_;
00081   public:
00082     IntV3Arraydoublep3();
00083     ~IntV3Arraydoublep3();
00084     int n1() const { return n1_; }
00085     int n2() const { return n2_; }
00086     int n3() const { return n3_; }
00087     void delete_data();
00088     void set_dim(int n1, int n2, int n3);
00089     double *&operator()(int i,int j,int k) { return data_[i][j][k]; }
00090     double **operator()(int i,int j) { return data_[i][j]; }
00091     double ***operator()(int i) { return data_[i]; }
00092     void print(std::ostream &);
00093     int nbyte() const;
00094 };
00095 
00096 class IntV3Arraydoublep4 {
00097   private:
00098     int n1_, n2_, n3_, n4_;
00099     double *****data_;
00100   public:
00101     IntV3Arraydoublep4();
00102     ~IntV3Arraydoublep4();
00103     void set_dim(int n1, int n2, int n3, int n4);
00104     double *&operator()(int i,int j,int k,int l) { return data_[i][j][k][l]; }
00105     void print(std::ostream &);
00106     int nbyte() const;
00107     double *****data() { return data_; }
00108 };
00109 
00110 class IntV3Arrayint3 {
00111   private:
00112     int n1_, n2_, n3_;
00113     int ***data_;
00114   public:
00115     IntV3Arrayint3();
00116     ~IntV3Arrayint3();
00117     void set_dim(int n1, int n2, int n3);
00118     int &operator()(int i,int j,int k) { return data_[i][j][k]; }
00119     int *operator()(int i,int j) { return data_[i][j]; }
00120     int **operator()(int i) { return data_[i]; }
00121     void print(std::ostream &);
00122     int nbyte() const;
00123 };
00124 
00125 class IntV3Arrayint4 {
00126   private:
00127     int n1_, n2_, n3_, n4_;
00128     int ****data_;
00129   public:
00130     IntV3Arrayint4();
00131     ~IntV3Arrayint4();
00132     void set_dim(int n1, int n2, int n3, int n4);
00133     int &operator()(int i,int j,int k,int l) { return data_[i][j][k][l]; }
00134     void print(std::ostream &);
00135     int nbyte() const;
00136 };
00137 
00138 #endif
00139 
00140 // Local Variables:
00141 // mode: c++
00142 // c-file-style: "CLJ"
00143 // End:

Generated at Thu Oct 4 18:08:42 2001 for MPQC 2.0.0 using the documentation package Doxygen 1.2.5.