- Main Page
- Related Pages
- Classes
- Files

# 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 namespace sc {
    00038
    00039 class IntV3Arraydouble2 {
    00040   private:
    00041     int n1_, n2_;
    00042     double **data_;
    00043   public:
    00044     IntV3Arraydouble2();
    00045     ~IntV3Arraydouble2();
    00046     void set_dim(int n1, int n2);
    00047     double &operator()(int i,int j) { return data_[i][j]; }
    00048     void print(std::ostream &);
    00049     int nbyte() const;
    00050 };
    00051
    00052 class IntV3Arraydouble3 {
    00053   private:
    00054     int n1_, n2_, n3_;
    00055     double ***data_;
    00056   public:
    00057     IntV3Arraydouble3();
    00058     ~IntV3Arraydouble3();
    00059     void set_dim(int n1, int n2, int n3);
    00060     double *operator()(int i,int j) { return data_[i][j]; }
    00061     double &operator()(int i,int j,int k) { return data_[i][j][k]; }
    00062     void print(std::ostream &);
    00063     int nbyte() const;
    00064 };
    00065
    00066 class IntV3Arraydoublep2 {
    00067   private:
    00068     int n1_, n2_;
    00069     double ***data_;
    00070   public:
    00071     IntV3Arraydoublep2();
    00072     ~IntV3Arraydoublep2();
    00073     void set_dim(int n1, int n2);
    00074     double *&operator()(int i,int j) { return data_[i][j]; }
    00075     void print(std::ostream &);
    00076     int nbyte() const;
    00077 };
    00078
    00079 class IntV3Arraydoublep3 {
    00080   private:
    00081     int n1_, n2_, n3_;
    00082     double ****data_;
    00083   public:
    00084     IntV3Arraydoublep3();
    00085     ~IntV3Arraydoublep3();
    00086     int n1() const { return n1_; }
    00087     int n2() const { return n2_; }
    00088     int n3() const { return n3_; }
    00089     void delete_data();
    00090     void set_dim(int n1, int n2, int n3);
    00091     double *&operator()(int i,int j,int k) { return data_[i][j][k]; }
    00092     double **operator()(int i,int j) { return data_[i][j]; }
    00093     double ***operator()(int i) { return data_[i]; }
    00094     void print(std::ostream &);
    00095     int nbyte() const;
    00096 };
    00097
    00098 class IntV3Arraydoublep4 {
    00099   private:
    00100     int n1_, n2_, n3_, n4_;
    00101     double *****data_;
    00102   public:
    00103     IntV3Arraydoublep4();
    00104     ~IntV3Arraydoublep4();
    00105     void set_dim(int n1, int n2, int n3, int n4);
    00106     double *&operator()(int i,int j,int k,int l) { return data_[i][j][k][l]; }
    00107     void print(std::ostream &);
    00108     int nbyte() const;
    00109     double *****data() { return data_; }
    00110 };
    00111
    00112 class IntV3Arrayint3 {
    00113   private:
    00114     int n1_, n2_, n3_;
    00115     int ***data_;
    00116   public:
    00117     IntV3Arrayint3();
    00118     ~IntV3Arrayint3();
    00119     void set_dim(int n1, int n2, int n3);
    00120     int &operator()(int i,int j,int k) { return data_[i][j][k]; }
    00121     int *operator()(int i,int j) { return data_[i][j]; }
    00122     int **operator()(int i) { return data_[i]; }
    00123     void print(std::ostream &);
    00124     int nbyte() const;
    00125 };
    00126
    00127 class IntV3Arrayint4 {
    00128   private:
    00129     int n1_, n2_, n3_, n4_;
    00130     int ****data_;
    00131   public:
    00132     IntV3Arrayint4();
    00133     ~IntV3Arrayint4();
    00134     void set_dim(int n1, int n2, int n3, int n4);
    00135     int &operator()(int i,int j,int k,int l) { return data_[i][j][k][l]; }
    00136     void print(std::ostream &);
    00137     int nbyte() const;
    00138 };
    00139
    00140 }
    00141
    00142 #endif
    00143
    00144 // Local Variables:
    00145 // mode: c++
    00146 // c-file-style: "CLJ"
    00147 // End: