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

cartiter.h

00001 //
00002 // cartiter.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 #ifndef _chemistry_qc_basis_cartiter_h
00029 #define _chemistry_qc_basis_cartiter_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00037 class CartesianIter {
00038   protected:
00039     int a_;
00040     int b_;
00041     int c_;
00042     int l_;
00043     int bfn_;
00044 
00045   public:
00047     CartesianIter(int l);
00048     virtual ~CartesianIter();
00049 
00051     virtual void start() =0;
00053     virtual void next() =0;
00055     virtual operator int() =0;
00056 
00058     int n();
00060     int a();
00062     int b();
00064     int c();
00066     int l();
00068     int l(int i);
00071     int bfn();
00072 };
00073 
00078 class RedundantCartesianIter {
00079   private:
00080     int done_;
00081     int l_;
00082     int *axis_;
00083 
00084   public:
00086     RedundantCartesianIter(int l);
00087     virtual ~RedundantCartesianIter();
00088 
00090     virtual int bfn() =0;
00091 
00093     void start();
00095     void next();
00097     operator int();
00098 
00100     int a();
00102     int b();
00104     int c();
00106     int l();
00108     int l(int i);
00110     int axis(int i);
00111 };
00112 
00115 class RedundantCartesianSubIter {
00116   private:
00117     int done_;
00118     int l_;
00119     int e_[3];
00120     int *axis_;
00121 
00122     void advance();
00123     int valid();
00124 
00125   public:
00127     RedundantCartesianSubIter(int l);
00128     virtual ~RedundantCartesianSubIter();
00129 
00131     virtual int bfn() =0;
00132 
00135     void start(int a, int b, int c);
00137     void next();
00139     operator int();
00140 
00142     int l();
00144     int a();
00146     int b();
00148     int c();
00150     int l(int i);
00152     int axis(int i);
00153 };
00154 
00155 #ifdef INLINE_FUNCTIONS
00156 #include <chemistry/qc/basis/cartiter_i.h>
00157 #endif
00158   
00159 #endif
00160 
00161 // Local Variables:
00162 // mode: c++
00163 // c-file-style: "ETS"
00164 // End:

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