ccaiter.h

00001 #ifdef __GNUG__
00002 #pragma interface
00003 #endif
00004 
00005 #ifndef _ccaiter_h
00006 #define _ccaiter_h
00007 
00008 #include <chemistry/qc/basis/cartiter.h>
00009 
00010 namespace MPQC {
00011 
00012 class CartesianIterCCA : public sc::CartesianIter {
00013   int *avec, *bvec, *cvec;
00014   public:
00015     CartesianIterCCA(int l) : CartesianIter(l) {}
00016     void start() {
00017       bfn_=b_=c_=0;
00018       a_=l_;
00019     }
00020     void next() {
00021       if (c_ < l_ - a_) {
00022         b_--;
00023         c_++;
00024       }
00025       else {
00026         a_--;
00027         c_ = 0;
00028         b_ = l_ - a_;
00029       }
00030       bfn_++;
00031     }
00032     operator int() {
00033       return (a_ >= 0);
00034     }
00035 };
00036 
00037 }
00038 
00039 #endif

Generated at Mon Dec 3 23:23:34 2007 for MPQC 2.3.1 using the documentation package Doxygen 1.5.2.