28#ifndef _chemistry_qc_basis_cartiter_h
29#define _chemistry_qc_basis_cartiter_h
57 virtual operator int() =0;
60 int n() {
return ((l_>=0)?((((l_)+2)*((l_)+1))>>1):0); }
62 int a() {
return a_; }
64 int b() {
return b_; }
66 int c() {
return c_; }
68 int l() {
return l_; }
70 int l(
int i) {
return i ? (i==1 ? b_ : c_) : a_; }
73 int bfn() {
return bfn_; }
99 operator int() {
return !done_; }
108 int l() {
return l_; }
112 int axis(
int i) {
return axis_[i]; }
123 for (
int i=0; i<l_; i++)
130 for (
int i=0; i<l_; i++) {
146 for (i=0; i<l_; i++)
if (axis_[i]==
axis) r++;
198 operator int()
const {
return !done_; }
201 int a()
const {
return e_[0]; }
203 int b()
const {
return e_[1]; }
205 int c()
const {
return e_[2]; }
207 int l()
const {
return l_; }
209 int l(
int i) {
return e_[i]; }
211 int axis(
int i) {
return axis_[i]; }
virtual void start()=0
Start the iteration.
int n()
Returns the number of Cartesian functions.
Definition cartiter.h:60
int c()
Returns the exponent of z.
Definition cartiter.h:66
virtual void next()=0
Move to the next Cartesian function.
CartesianIter(int l)
Initialize an iterator for the given angular momentum.
int bfn()
Returns the number of the current basis function within the shell.
Definition cartiter.h:73
int l()
Returns the angular momentum.
Definition cartiter.h:68
int l(int i)
Returns a() if i==0, b() if i==1, and c() if i==2.
Definition cartiter.h:70
int b()
Returns the exponent of y.
Definition cartiter.h:64
int a()
Returns the exponent of x.
Definition cartiter.h:62
void next()
Move to the next combination of axes.
Definition cartiter.h:128
int axis(int i)
Return the i'th axis.
Definition cartiter.h:112
int l()
The angular momentum.
Definition cartiter.h:108
int a()
The current exponent of x.
Definition cartiter.h:151
void start()
Initialize the iterator.
Definition cartiter.h:116
int b()
The current exponent of y.
Definition cartiter.h:157
RedundantCartesianIter(int l)
Create a object for the given angular momentum.
int c()
The current exponent of z.
Definition cartiter.h:163
virtual int bfn()=0
Return the current Cartesian basis function number.
int axis(int i)
Return the i'th axis.
Definition cartiter.h:211
int a() const
The current exponent of x.
Definition cartiter.h:201
void start(int a, int b, int c)
Initialize the iterator.
int c() const
The current exponent of z.
Definition cartiter.h:205
int b() const
The current exponent of y.
Definition cartiter.h:203
RedundantCartesianSubIter(int l)
Create a object for the given angular momentum.
void next()
Move to the next combination of axes.
int l(int i)
Returns a() if i==0, b() if i==1, and c() if i==2.
Definition cartiter.h:209
virtual int bfn()=0
Return the current Cartesian basis function number.
int l() const
The angular momentum.
Definition cartiter.h:207