36void EvtCGCoefSingle::init(
int j1,
int j2){
44 _table.resize((_Jmax-_Jmin)/2+1);
49 if (j2<j1) lenmax=j2+1;
52 for(J=_Jmax;J>=_Jmin;J-=2){
53 _table[(J-_Jmin)/2].resize(J+1);
55 int len=((_j1+_j2)-
abs(M))/2+1;
56 if (len>lenmax) len=lenmax;
57 _table[(J-_Jmin)/2][(M+J)/2].resize(len);
62 for(J=_Jmax;J>=_Jmin;J-=2){
68 std::vector<double>* vectors=
new std::vector<double>[n-1];
74 double tmp=_table[(_Jmax-_Jmin)/2-i][(J+_Jmax-2*i)/2][k];
79 std::vector<double> orth=getOrth.getOrthogVector();
81 if (orth[n-1]<0.0) sign=-1;
83 _table[(J-_Jmin)/2][J][k]=sign*orth[k];
87 for(M=J-2;M>=-J;M-=2){
88 int len=((_j1+_j2)-
abs(M))/2+1;
89 if (len>lenmax) len=lenmax;
91 if (mmin<-j1) mmin=-j1;
93 for(m1=mmin;m1<mmin+len*2;m1+=2){
96 float fkwTmp = _j1*(_j1+2)-(m1+2)*m1;
101 if (m1+2<=_j1) sum+=0.5*sqrt(fkwTmp)*cg(J,M+2,m1+2,m2);
102 fkwTmp = _j2*(_j2+2)-(m2+2)*m2;
103 if (m2+2<=_j2) sum+=0.5*sqrt(fkwTmp)*cg(J,M+2,m1,m2+2);
104 fkwTmp = J*(J+2)-(M+2)*M;
105 sum/=(0.5*sqrt(fkwTmp));
121 return cg(J,M,m1,m2);
127double& EvtCGCoefSingle::cg(
int J,
int M,
int m1,
int m2){
133 assert(
abs(m1)<=_j1);
134 assert(
abs(m2)<=_j2);
140 if (mmin<-_j1) mmin=-_j1;
144 return _table[(J-_Jmin)/2][(M+J)/2][n/2];
double coef(int J, int M, int j1, int j2, int m1, int m2)