#include CPS_START_NAMESPACE /*! used to iteraterate over all possible shifts */ void Shift::Next() { if(q==QUARK) { q-=2 ; return ; } if(d==FRWD) { q=QUARK; d-=2 ; return ; } more=false ; } /*! Returns the operator Tag, a string to be used in 3pt IO */ void Derivative::Tag() { char *cname="Derivative" ; char *fname="Tag" ; //check the shift and indx pointers if(Num>0){ if(indx == 0) ERR.Pointer(cname, fname, "indx"); if(sh == 0) ERR.Pointer(cname, fname, "sh"); } tag = new char[2*Num+1]; if(tag==0) ERR.Pointer(cname, fname, "tag"); tag[0]='\0' ; // Start with an empty string for(int i(0);i0 1-->1) \li b=-1 the link is forward (there is a minus in the definition of bit) \li b=1 the link is backward Example: \verbatim Path F ----> Indx 0 Path B ----> Indx 1 Path FF ---> Indx 0 Path BF ---> Indx 1 Path FB ---> Indx 2 Path BB ---> Indx 3 Path FFF ---> Indx 0 Path FBF ---> Indx 1 Path FFB ---> Indx 2 Path FBB ---> Indx 3 Path BFF ---> Indx 4 Path BBF ---> Indx 5 Path BFB ---> Indx 6 Path BBB ---> Indx 7 \endverbatim */ int Derivative::DTermIndx() { int r(0) ; for(int i(0) ; i0) t = 1 << i ; r+=t ; } return r ; } Derivative::~Derivative() { if (Num>0) { delete [] indx; delete [] sh ; } delete [] tag ; } CPS_END_NAMESPACE