AbstractModel::SufficientStatisticsVector MultivariateModel ::GetSufficientStatistics(const Realizations &R, const Observations& Obs) { /// Computation of the suffisient statistics of the model /// Basically, it is a vector (named S1 to S9) of vectors /// S1 <- y_ij * eta_ij & S2 <- eta_ij * eta_ij VectorType S1(m_NbTotalOfObservations), S2(m_NbTotalOfObservations); auto itS1 = S1.begin(), itS2 = S2.begin(); for(size_t i = 0; i < m_NumberOfSubjects; ++i) { for(size_t j = 0; j < Obs.GetNumberOfTimePoints(i); ++j) { VectorType PC = ComputeParallelCurve(i, j); *itS1 = dot_product(PC, Obs.GetSubjectCognitiveScore(i, j)); *itS2 = PC.squared_magnitude(); ++itS1, ++itS2; } } /// S3 <- Ksi_i & S4 <- Ksi_i * Ksi_i VectorType S3 = R.at("Ksi"); VectorType S4 = R.at("Ksi") % R.at("Ksi"); /// S5 <- Tau_i & S6 <- Tau_i * Tau_i VectorType S5 = R.at("Tau"); VectorType S6 = R.at("Tau") % R.at("Tau"); /// S7 <- G VectorType S7(1, R.at("G", 0)); /// S8 <- beta_k VectorType S8((m_ManifoldDimension-1) * m_NbIndependentSources); ScalarType * itS8 = S8.memptr(); for(size_t i = 0; i < S8.size(); ++i) itS8[i] = R.at("Beta#" + std::to_string(i), 0); /// S8 <- delta_k VectorType S9(m_ManifoldDimension - 1); ScalarType * itS9 = S9.memptr(); for(size_t i = 1; i < S9.size(); ++i) itS9[i] = R.at("Delta#" + std::to_string(i), 0); return {S1, S2, S3, S4, S5, S6, S7, S8, S9}; }
void test(int M, int N) { /* Scattering iterators. */ int c2, c4, c6; /* Original iterators. */ int i, j, k; if ((M <= -1) && (N >= 1)) { S1(0) ; } if ((M >= 0) && (N >= 1)) { S1(0) ; } if ((M >= 1) && (N >= 2)) { for (c4=0;c4<=M-1;c4++) { S2(0,c4) ; } S3(0) ; for (c4=0;c4<=M-1;c4++) { S4(0,c4) ; } S10(0) ; S1(1) ; S5(0) ; } if ((M <= 0) && (N >= 2)) { S3(0) ; S10(0) ; S1(1) ; S5(0) ; } if ((M >= 1) && (N == 1)) { for (c4=0;c4<=M-1;c4++) { S2(0,c4) ; } S3(0) ; for (c4=0;c4<=M-1;c4++) { S4(0,c4) ; } S10(0) ; S5(0) ; } if ((M <= 0) && (N == 1)) { S3(0) ; S10(0) ; S5(0) ; } for (c2=2;c2<=min(N-1,M);c2++) { for (c4=c2-1;c4<=N-1;c4++) { i = c2-2 ; S6(c2-2,c4) ; for (c6=c2-2;c6<=M-1;c6++) { i = c2-2 ; S7(c2-2,c4,c6) ; } i = c2-2 ; S8(c2-2,c4) ; for (c6=c2-2;c6<=M-1;c6++) { i = c2-2 ; S9(c2-2,c4,c6) ; } } for (c4=c2-1;c4<=M-1;c4++) { i = c2-1 ; S2(c2-1,c4) ; } i = c2-1 ; S3(c2-1) ; for (c4=c2-1;c4<=M-1;c4++) { i = c2-1 ; S4(c2-1,c4) ; } i = c2-1 ; S10(c2-1) ; S1(c2) ; i = c2-1 ; S5(c2-1) ; } if ((M >= 1) && (M <= N-2)) { c2 = M+1 ; for (c4=M;c4<=N-1;c4++) { i = M-1 ; S6(M-1,c4) ; c6 = M-1 ; i = M-1 ; k = M-1 ; S7(M-1,c4,M-1) ; i = M-1 ; S8(M-1,c4) ; c6 = M-1 ; i = M-1 ; k = M-1 ; S9(M-1,c4,M-1) ; } S3(M) ; S10(M) ; i = M+1 ; S1(M+1) ; S5(M) ; } if ((M >= N) && (N >= 2)) { c4 = N-1 ; i = N-2 ; j = N-1 ; S6(N-2,N-1) ; for (c6=N-2;c6<=M-1;c6++) { i = N-2 ; j = N-1 ; S7(N-2,N-1,c6) ; } i = N-2 ; j = N-1 ; S8(N-2,N-1) ; for (c6=N-2;c6<=M-1;c6++) { i = N-2 ; j = N-1 ; S9(N-2,N-1,c6) ; } for (c4=N-1;c4<=M-1;c4++) { i = N-1 ; S2(N-1,c4) ; } i = N-1 ; S3(N-1) ; for (c4=N-1;c4<=M-1;c4++) { i = N-1 ; S4(N-1,c4) ; } i = N-1 ; S10(N-1) ; i = N-1 ; S5(N-1) ; } if ((M == N-1) && (N >= 2)) { c4 = N-1 ; i = N-2 ; j = N-1 ; S6(N-2,N-1) ; c6 = N-2 ; i = N-2 ; j = N-1 ; k = N-2 ; S7(N-2,N-1,N-2) ; i = N-2 ; j = N-1 ; S8(N-2,N-1) ; c6 = N-2 ; i = N-2 ; j = N-1 ; k = N-2 ; S9(N-2,N-1,N-2) ; i = N-1 ; S3(N-1) ; i = N-1 ; S10(N-1) ; i = N-1 ; S5(N-1) ; } for (c2=max(M+2,2);c2<=N-1;c2++) { for (c4=c2-1;c4<=N-1;c4++) { i = c2-2 ; S6(c2-2,c4) ; i = c2-2 ; S8(c2-2,c4) ; } i = c2-1 ; S3(c2-1) ; i = c2-1 ; S10(c2-1) ; S1(c2) ; i = c2-1 ; S5(c2-1) ; } if ((M <= N-2) && (N >= 2)) { c4 = N-1 ; i = N-2 ; j = N-1 ; S6(N-2,N-1) ; i = N-2 ; j = N-1 ; S8(N-2,N-1) ; i = N-1 ; S3(N-1) ; i = N-1 ; S10(N-1) ; i = N-1 ; S5(N-1) ; } }
SolidesP ConstruireNormale (FacesP Face) // Construit un solide symbolisant la normale à la face. // Le solide est placé sur le barycentre de la face et peut donc // être hors de la face. // Sa longueur est égale à 5% de la dimension du solide à laquelle la // face appartient s'il existe. Sinon, c'est 10 % de la dimension de la face. { SolidesP Sol = Face.Solide () ; double HauteurTot ; Englobants3D EnglobantFace = Face.Englobant () ; if (Sol.EstInitialise ()) { Englobants3D E = Sol.Englobant () ; Vecteurs3D V (E.BasGauche (),E.HautDroit ()) ; HauteurTot = 0.05*V.Norme () ; ; } else { Vecteurs3D V (EnglobantFace.BasGauche (),EnglobantFace.HautDroit ()) ; HauteurTot = 0.1*V.Norme () ; ; } double LargeurPied = HauteurTot / 24, LargeurTete = HauteurTot / 4, HauteurPied = (7./8.)*HauteurTot ; // Construction d'un repère centré sur le "barycentre" de la face, dont // le (xOy) correspond au plan de la face et dont le z est la normale à // la face. Points3D Origine = 0.5*(EnglobantFace.BasGauche ()+EnglobantFace.HautDroit ()) ; Vecteurs3D K = Face.VecteurNormal ().VecteurNorme (), U (Face.ContourExterieur ().IemeAreteOrientee (0).Origine ().Point3D (), Face.ContourExterieur ().IemeAreteOrientee (0).Extremite ().Point3D ()), I = (K & U).VecteurNorme (), J = (K & I).VecteurNorme () ; SommetsP S1 (Origine-LargeurPied/2*I - LargeurPied/2*J) ; SommetsP S2 (Origine-LargeurPied/2*I + LargeurPied/2*J) ; SommetsP S3 (Origine+LargeurPied/2*I + LargeurPied/2*J) ; SommetsP S4 (Origine+LargeurPied/2*I - LargeurPied/2*J) ; SommetsP S5 (Origine-LargeurPied/2*I - LargeurPied/2*J + HauteurPied*K) ; SommetsP S6 (Origine-LargeurPied/2*I + LargeurPied/2*J + HauteurPied*K) ; SommetsP S7 (Origine+LargeurPied/2*I + LargeurPied/2*J + HauteurPied*K) ; SommetsP S8 (Origine+LargeurPied/2*I - LargeurPied/2*J + HauteurPied*K) ; SommetsP S9 (Origine-LargeurTete/2*I - LargeurTete/2*J + HauteurPied*K) ; SommetsP S10 (Origine-LargeurTete/2*I + LargeurTete/2*J + HauteurPied*K) ; SommetsP S11 (Origine+LargeurTete/2*I + LargeurTete/2*J + HauteurPied*K) ; SommetsP S12 (Origine+LargeurTete/2*I - LargeurTete/2*J + HauteurPied*K) ; SommetsP S13 (Origine+HauteurTot*K) ; AretesP A1 (S1,S2) ; AretesP A2 (S2,S3) ; AretesP A3 (S3,S4) ; AretesP A4 (S4,S1) ; AretesP A5 (S5,S6) ; AretesP A6 (S6,S7) ; AretesP A7 (S7,S8) ; AretesP A8 (S8,S5) ; AretesP A9 (S9,S10) ; AretesP A10 (S10,S11) ; AretesP A11 (S11,S12) ; AretesP A12 (S12,S9) ; AretesP A13 (S1,S5) ; AretesP A14 (S2,S6) ; AretesP A15 (S3,S7) ; AretesP A16 (S4,S8) ; AretesP A17 (S9,S13) ; AretesP A18 (S10,S13) ; AretesP A19 (S11,S13) ; AretesP A20 (S12,S13) ; Listes <AretesP> L1 ; L1.InsertionEnQueue (A1) ; L1.InsertionEnQueue (A2) ; L1.InsertionEnQueue (A3) ; L1.InsertionEnQueue (A4) ; Listes <AretesP> L2 ; L2.InsertionEnQueue (A1) ; L2.InsertionEnQueue (A13) ; L2.InsertionEnQueue (A5) ; L2.InsertionEnQueue (A14) ; Listes <AretesP> L3 ; L3.InsertionEnQueue (A2) ; L3.InsertionEnQueue (A14) ; L3.InsertionEnQueue (A6) ; L3.InsertionEnQueue (A15) ; Listes <AretesP> L4 ; L4.InsertionEnQueue (A3) ; L4.InsertionEnQueue (A15) ; L4.InsertionEnQueue (A7) ; L4.InsertionEnQueue (A16) ; Listes <AretesP> L5 ; L5.InsertionEnQueue (A4) ; L5.InsertionEnQueue (A16) ; L5.InsertionEnQueue (A8) ; L5.InsertionEnQueue (A13) ; Listes <AretesP> L6 ; L6.InsertionEnQueue (A9) ; L6.InsertionEnQueue (A10) ; L6.InsertionEnQueue (A11) ; L6.InsertionEnQueue (A12) ; Listes <AretesP> L7 ; L7.InsertionEnQueue (A8) ; L7.InsertionEnQueue (A7) ; L7.InsertionEnQueue (A6) ; L7.InsertionEnQueue (A5) ; Listes <AretesP> L8 ; L8.InsertionEnQueue (A9) ; L8.InsertionEnQueue (A17) ; L8.InsertionEnQueue (A18) ; Listes <AretesP> L9 ; L9.InsertionEnQueue (A10) ; L9.InsertionEnQueue (A18) ; L9.InsertionEnQueue (A19) ; Listes <AretesP> L10 ; L10.InsertionEnQueue (A11) ; L10.InsertionEnQueue (A19) ; L10.InsertionEnQueue (A20) ; Listes <AretesP> L11 ; L11.InsertionEnQueue (A12) ; L11.InsertionEnQueue (A20) ; L11.InsertionEnQueue (A17) ; Listes <FacesP> ListeFaces ; AttributsFaces *PAF = new AttributsFaces (PMateriauRouge) ; FacesP F1 (ContoursP (L1),PAF) ; ListeFaces.InsertionEnQueue (F1) ; ListeFaces.InsertionEnQueue (FacesP (ContoursP (L2),PAF)) ; ListeFaces.InsertionEnQueue (FacesP (ContoursP (L3),PAF)) ; ListeFaces.InsertionEnQueue (FacesP (ContoursP (L4),PAF)) ; ListeFaces.InsertionEnQueue (FacesP (ContoursP (L5),PAF)) ; ContoursP C (L6) ; FacesP F (C,PAF) ; F.AjouterContourInterieur (ContoursP (L7)) ; ListeFaces.InsertionEnQueue (F) ; ListeFaces.InsertionEnQueue (FacesP (ContoursP (L8),PAF)) ; ListeFaces.InsertionEnQueue (FacesP (ContoursP (L9),PAF)) ; ListeFaces.InsertionEnQueue (FacesP (ContoursP (L10),PAF)) ; ListeFaces.InsertionEnQueue (FacesP (ContoursP (L11),PAF)) ; return SolidesP (ListeFaces) ; }
void test(int M, int N, int O, int P, int Q, int R) { /* Scattering iterators. */ int p1, p3, p5; /* Original iterators. */ int i, j, k; if (M == 1) { S1() ; S2() ; S3() ; S4() ; S5() ; S6() ; S7() ; S8() ; S9() ; S10() ; S11() ; S12() ; S13() ; S14() ; S15() ; S16() ; S17() ; S18() ; S19() ; S20() ; S21() ; S22() ; S23() ; S24() ; S25() ; S26() ; S27() ; } if (M == 1) { for (p1=1;p1<=N;p1++) { for (p3=1;p3<=N;p3++) { S28(p1,p3) ; S29(p1,p3) ; S30(p1,p3) ; } S31(p1) ; } } if (M == 1) { S32() ; S33() ; S34() ; } if ((M == 1) && (O <= 1)) { S35() ; } if (M == 1) { S36() ; S37() ; } if ((M == 1) && (N >= 1) && (Q >= 1) && (R >= 1)) { for (p1=2;p1<=P;p1++) { S38(p1) ; S39(p1) ; for (p3=1;p3<=Q;p3++) { for (p5=1;p5<=R;p5++) { S40(p1,p3,p5) ; S41(p1,p3,p5) ; S42(p1,p3,p5) ; S43(p1,p3,p5) ; } } for (p3=1;p3<=Q;p3++) { S44(p1,p3) ; S45(p1,p3) ; S46(p1,p3) ; S47(p1,p3) ; } for (p3=1;p3<=R;p3++) { S48(p1,p3) ; S49(p1,p3) ; S50(p1,p3) ; S51(p1,p3) ; } S52(p1) ; S53(p1) ; S54(p1) ; S55(p1) ; S56(p1) ; S57(p1) ; S58(p1) ; for (p3=1;p3<=Q;p3++) { for (p5=1;p5<=R;p5++) { S59(p1,p3,p5) ; S60(p1,p3,p5) ; S61(p1,p3,p5) ; } } for (p3=1;p3<=Q;p3++) { S62(p1,p3) ; S63(p1,p3) ; S64(p1,p3) ; } for (p3=1;p3<=R;p3++) { S65(p1,p3) ; S66(p1,p3) ; S67(p1,p3) ; } S68(p1) ; S69(p1) ; S70(p1) ; S71(p1) ; S72(p1) ; S73(p1) ; S74(p1) ; S75(p1) ; S76(p1) ; S77(p1) ; S78(p1) ; S79(p1) ; S80(p1) ; S81(p1) ; S82(p1) ; S83(p1) ; S84(p1) ; S85(p1) ; S86(p1) ; S87(p1) ; S88(p1) ; S89(p1) ; S90(p1) ; S91(p1) ; S92(p1) ; S93(p1) ; S94(p1) ; for (p3=1;p3<=N;p3++) { for (p5=1;p5<=N;p5++) { S95(p1,p3,p5) ; S96(p1,p3,p5) ; S97(p1,p3,p5) ; } S98(p1,p3) ; } S99(p1) ; S100(p1) ; S101(p1) ; for (p3=1;p3<=Q;p3++) { for (p5=1;p5<=R;p5++) { S102(p1,p3,p5) ; S103(p1,p3,p5) ; S104(p1,p3,p5) ; S105(p1,p3,p5) ; S106(p1,p3,p5) ; S107(p1,p3,p5) ; } } for (p3=1;p3<=Q;p3++) { S108(p1,p3) ; S109(p1,p3) ; S110(p1,p3) ; S111(p1,p3) ; S112(p1,p3) ; S113(p1,p3) ; } for (p3=1;p3<=R;p3++) { S114(p1,p3) ; S115(p1,p3) ; S116(p1,p3) ; S117(p1,p3) ; S118(p1,p3) ; S119(p1,p3) ; } S120(p1) ; S121(p1) ; S122(p1) ; S123(p1) ; S124(p1) ; S125(p1) ; } } if ((M == 1) && (N <= 0) && (Q >= 1) && (R >= 1)) { for (p1=2;p1<=P;p1++) { S38(p1) ; S39(p1) ; for (p3=1;p3<=Q;p3++) { for (p5=1;p5<=R;p5++) { S40(p1,p3,p5) ; S41(p1,p3,p5) ; S42(p1,p3,p5) ; S43(p1,p3,p5) ; } } for (p3=1;p3<=Q;p3++) { S44(p1,p3) ; S45(p1,p3) ; S46(p1,p3) ; S47(p1,p3) ; } for (p3=1;p3<=R;p3++) { S48(p1,p3) ; S49(p1,p3) ; S50(p1,p3) ; S51(p1,p3) ; } S52(p1) ; S53(p1) ; S54(p1) ; S55(p1) ; S56(p1) ; S57(p1) ; S58(p1) ; for (p3=1;p3<=Q;p3++) { for (p5=1;p5<=R;p5++) { S59(p1,p3,p5) ; S60(p1,p3,p5) ; S61(p1,p3,p5) ; } } for (p3=1;p3<=Q;p3++) { S62(p1,p3) ; S63(p1,p3) ; S64(p1,p3) ; } for (p3=1;p3<=R;p3++) { S65(p1,p3) ; S66(p1,p3) ; S67(p1,p3) ; } S68(p1) ; S69(p1) ; S70(p1) ; S71(p1) ; S72(p1) ; S73(p1) ; S74(p1) ; S75(p1) ; S76(p1) ; S77(p1) ; S78(p1) ; S79(p1) ; S80(p1) ; S81(p1) ; S82(p1) ; S83(p1) ; S84(p1) ; S85(p1) ; S86(p1) ; S87(p1) ; S88(p1) ; S89(p1) ; S90(p1) ; S91(p1) ; S92(p1) ; S93(p1) ; S94(p1) ; S99(p1) ; S100(p1) ; S101(p1) ; for (p3=1;p3<=Q;p3++) { for (p5=1;p5<=R;p5++) { S102(p1,p3,p5) ; S103(p1,p3,p5) ; S104(p1,p3,p5) ; S105(p1,p3,p5) ; S106(p1,p3,p5) ; S107(p1,p3,p5) ; } } for (p3=1;p3<=Q;p3++) { S108(p1,p3) ; S109(p1,p3) ; S110(p1,p3) ; S111(p1,p3) ; S112(p1,p3) ; S113(p1,p3) ; } for (p3=1;p3<=R;p3++) { S114(p1,p3) ; S115(p1,p3) ; S116(p1,p3) ; S117(p1,p3) ; S118(p1,p3) ; S119(p1,p3) ; } S120(p1) ; S121(p1) ; S122(p1) ; S123(p1) ; S124(p1) ; S125(p1) ; } } if ((M == 1) && (N >= 1) && (Q <= 0) && (R >= 1)) { for (p1=2;p1<=P;p1++) { S38(p1) ; S39(p1) ; for (p3=1;p3<=R;p3++) { S48(p1,p3) ; S49(p1,p3) ; S50(p1,p3) ; S51(p1,p3) ; } S52(p1) ; S53(p1) ; S54(p1) ; S55(p1) ; S56(p1) ; S57(p1) ; S58(p1) ; for (p3=1;p3<=R;p3++) { S65(p1,p3) ; S66(p1,p3) ; S67(p1,p3) ; } S68(p1) ; S69(p1) ; S70(p1) ; S71(p1) ; S72(p1) ; S73(p1) ; S74(p1) ; S75(p1) ; S76(p1) ; S77(p1) ; S78(p1) ; S79(p1) ; S80(p1) ; S81(p1) ; S82(p1) ; S83(p1) ; S84(p1) ; S85(p1) ; S86(p1) ; S87(p1) ; S88(p1) ; S89(p1) ; S90(p1) ; S91(p1) ; S92(p1) ; S93(p1) ; S94(p1) ; for (p3=1;p3<=N;p3++) { for (p5=1;p5<=N;p5++) { S95(p1,p3,p5) ; S96(p1,p3,p5) ; S97(p1,p3,p5) ; } S98(p1,p3) ; } S99(p1) ; S100(p1) ; S101(p1) ; for (p3=1;p3<=R;p3++) { S114(p1,p3) ; S115(p1,p3) ; S116(p1,p3) ; S117(p1,p3) ; S118(p1,p3) ; S119(p1,p3) ; } S120(p1) ; S121(p1) ; S122(p1) ; S123(p1) ; S124(p1) ; S125(p1) ; } } if ((M == 1) && (N <= 0) && (Q <= 0) && (R >= 1)) { for (p1=2;p1<=P;p1++) { S38(p1) ; S39(p1) ; for (p3=1;p3<=R;p3++) { S48(p1,p3) ; S49(p1,p3) ; S50(p1,p3) ; S51(p1,p3) ; } S52(p1) ; S53(p1) ; S54(p1) ; S55(p1) ; S56(p1) ; S57(p1) ; S58(p1) ; for (p3=1;p3<=R;p3++) { S65(p1,p3) ; S66(p1,p3) ; S67(p1,p3) ; } S68(p1) ; S69(p1) ; S70(p1) ; S71(p1) ; S72(p1) ; S73(p1) ; S74(p1) ; S75(p1) ; S76(p1) ; S77(p1) ; S78(p1) ; S79(p1) ; S80(p1) ; S81(p1) ; S82(p1) ; S83(p1) ; S84(p1) ; S85(p1) ; S86(p1) ; S87(p1) ; S88(p1) ; S89(p1) ; S90(p1) ; S91(p1) ; S92(p1) ; S93(p1) ; S94(p1) ; S99(p1) ; S100(p1) ; S101(p1) ; for (p3=1;p3<=R;p3++) { S114(p1,p3) ; S115(p1,p3) ; S116(p1,p3) ; S117(p1,p3) ; S118(p1,p3) ; S119(p1,p3) ; } S120(p1) ; S121(p1) ; S122(p1) ; S123(p1) ; S124(p1) ; S125(p1) ; } } if ((M == 1) && (N >= 1) && (Q <= 0) && (R <= 0)) { for (p1=2;p1<=P;p1++) { S38(p1) ; S39(p1) ; S52(p1) ; S53(p1) ; S54(p1) ; S55(p1) ; S56(p1) ; S57(p1) ; S58(p1) ; S68(p1) ; S69(p1) ; S70(p1) ; S71(p1) ; S72(p1) ; S73(p1) ; S74(p1) ; S75(p1) ; S76(p1) ; S77(p1) ; S78(p1) ; S79(p1) ; S80(p1) ; S81(p1) ; S82(p1) ; S83(p1) ; S84(p1) ; S85(p1) ; S86(p1) ; S87(p1) ; S88(p1) ; S89(p1) ; S90(p1) ; S91(p1) ; S92(p1) ; S93(p1) ; S94(p1) ; for (p3=1;p3<=N;p3++) { for (p5=1;p5<=N;p5++) { S95(p1,p3,p5) ; S96(p1,p3,p5) ; S97(p1,p3,p5) ; } S98(p1,p3) ; } S99(p1) ; S100(p1) ; S101(p1) ; S120(p1) ; S121(p1) ; S122(p1) ; S123(p1) ; S124(p1) ; S125(p1) ; } } if ((M == 1) && (N <= 0) && (Q <= 0) && (R <= 0)) { for (p1=2;p1<=P;p1++) { S38(p1) ; S39(p1) ; S52(p1) ; S53(p1) ; S54(p1) ; S55(p1) ; S56(p1) ; S57(p1) ; S58(p1) ; S68(p1) ; S69(p1) ; S70(p1) ; S71(p1) ; S72(p1) ; S73(p1) ; S74(p1) ; S75(p1) ; S76(p1) ; S77(p1) ; S78(p1) ; S79(p1) ; S80(p1) ; S81(p1) ; S82(p1) ; S83(p1) ; S84(p1) ; S85(p1) ; S86(p1) ; S87(p1) ; S88(p1) ; S89(p1) ; S90(p1) ; S91(p1) ; S92(p1) ; S93(p1) ; S94(p1) ; S99(p1) ; S100(p1) ; S101(p1) ; S120(p1) ; S121(p1) ; S122(p1) ; S123(p1) ; S124(p1) ; S125(p1) ; } } if ((M == 1) && (N >= 1) && (Q >= 1) && (R <= 0)) { for (p1=2;p1<=P;p1++) { S38(p1) ; S39(p1) ; for (p3=1;p3<=Q;p3++) { S44(p1,p3) ; S45(p1,p3) ; S46(p1,p3) ; S47(p1,p3) ; } S52(p1) ; S53(p1) ; S54(p1) ; S55(p1) ; S56(p1) ; S57(p1) ; S58(p1) ; for (p3=1;p3<=Q;p3++) { S62(p1,p3) ; S63(p1,p3) ; S64(p1,p3) ; } S68(p1) ; S69(p1) ; S70(p1) ; S71(p1) ; S72(p1) ; S73(p1) ; S74(p1) ; S75(p1) ; S76(p1) ; S77(p1) ; S78(p1) ; S79(p1) ; S80(p1) ; S81(p1) ; S82(p1) ; S83(p1) ; S84(p1) ; S85(p1) ; S86(p1) ; S87(p1) ; S88(p1) ; S89(p1) ; S90(p1) ; S91(p1) ; S92(p1) ; S93(p1) ; S94(p1) ; for (p3=1;p3<=N;p3++) { for (p5=1;p5<=N;p5++) { S95(p1,p3,p5) ; S96(p1,p3,p5) ; S97(p1,p3,p5) ; } S98(p1,p3) ; } S99(p1) ; S100(p1) ; S101(p1) ; for (p3=1;p3<=Q;p3++) { S108(p1,p3) ; S109(p1,p3) ; S110(p1,p3) ; S111(p1,p3) ; S112(p1,p3) ; S113(p1,p3) ; } S120(p1) ; S121(p1) ; S122(p1) ; S123(p1) ; S124(p1) ; S125(p1) ; } } if ((M == 1) && (N <= 0) && (Q >= 1) && (R <= 0)) { for (p1=2;p1<=P;p1++) { S38(p1) ; S39(p1) ; for (p3=1;p3<=Q;p3++) { S44(p1,p3) ; S45(p1,p3) ; S46(p1,p3) ; S47(p1,p3) ; } S52(p1) ; S53(p1) ; S54(p1) ; S55(p1) ; S56(p1) ; S57(p1) ; S58(p1) ; for (p3=1;p3<=Q;p3++) { S62(p1,p3) ; S63(p1,p3) ; S64(p1,p3) ; } S68(p1) ; S69(p1) ; S70(p1) ; S71(p1) ; S72(p1) ; S73(p1) ; S74(p1) ; S75(p1) ; S76(p1) ; S77(p1) ; S78(p1) ; S79(p1) ; S80(p1) ; S81(p1) ; S82(p1) ; S83(p1) ; S84(p1) ; S85(p1) ; S86(p1) ; S87(p1) ; S88(p1) ; S89(p1) ; S90(p1) ; S91(p1) ; S92(p1) ; S93(p1) ; S94(p1) ; S99(p1) ; S100(p1) ; S101(p1) ; for (p3=1;p3<=Q;p3++) { S108(p1,p3) ; S109(p1,p3) ; S110(p1,p3) ; S111(p1,p3) ; S112(p1,p3) ; S113(p1,p3) ; } S120(p1) ; S121(p1) ; S122(p1) ; S123(p1) ; S124(p1) ; S125(p1) ; } } }
void test(int M, int N, int O, int P, int Q, int R, int S, int T, int U) { /* Scattering iterators. */ int c2, c4, c6; /* Original iterators. */ int i, j, k; if ((M >= 2) && (N >= 4)) { for (c2=1;c2<=O-1;c2++) { for (c6=1;c6<=M;c6++) { S1(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S6(c2,1,c6) ; S7(c2,1,c6) ; } for (c6=1;c6<=M;c6++) { S3(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S1(c2,2,c6) ; } S1(c2,2,M) ; for (c6=1;c6<=M-1;c6++) { S6(c2,2,c6) ; S7(c2,2,c6) ; } for (c6=1;c6<=M-1;c6++) { S11(c2,1,c6) ; } for (c4=3;c4<=2*N-5;c4++) { for (c6=1;c6<=M-1;c6++) { if ((c4+1)%2 == 0) { j = (c4-1)/2 ; S10(c2,(c4-1)/2,c6) ; } } for (c6=1;c6<=M;c6++) { if ((c4+1)%2 == 0) { j = (c4+1)/2 ; S3(c2,(c4+1)/2,c6) ; } } for (c6=1;c6<=M-1;c6++) { if (c4%2 == 0) { j = (c4+2)/2 ; S6(c2,(c4+2)/2,c6) ; S7(c2,(c4+2)/2,c6) ; } if ((c4+1)%2 == 0) { j = (c4+3)/2 ; S1(c2,(c4+3)/2,c6) ; } } if ((c4+1)%2 == 0) { j = (c4+3)/2 ; S1(c2,(c4+3)/2,M) ; } for (c6=1;c6<=M-1;c6++) { if (c4%2 == 0) { S11(c2,c4/2,c6) ; } } } c4 = 2*N-4 ; for (c6=1;c6<=M-1;c6++) { j = N-1 ; S6(c2,N-1,c6) ; S7(c2,N-1,c6) ; } for (c6=1;c6<=M-1;c6++) { j = N-2 ; S11(c2,N-2,c6) ; } c4 = 2*N-3 ; for (c6=1;c6<=M-1;c6++) { j = N-2 ; S10(c2,N-2,c6) ; } for (c6=1;c6<=M;c6++) { j = N-1 ; S3(c2,N-1,c6) ; } c4 = 2*N-2 ; for (c6=1;c6<=M-1;c6++) { j = N-1 ; S11(c2,N-1,c6) ; } c4 = 2*N-1 ; for (c6=1;c6<=M-1;c6++) { j = N-1 ; S10(c2,N-1,c6) ; } } } if ((M >= 2) && (N == 3)) { for (c2=1;c2<=O-1;c2++) { for (c6=1;c6<=M;c6++) { S1(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S6(c2,1,c6) ; S7(c2,1,c6) ; } for (c6=1;c6<=M;c6++) { S3(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S1(c2,2,c6) ; } S1(c2,2,M) ; for (c6=1;c6<=M-1;c6++) { S6(c2,2,c6) ; S7(c2,2,c6) ; } for (c6=1;c6<=M-1;c6++) { S11(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S10(c2,1,c6) ; } for (c6=1;c6<=M;c6++) { S3(c2,2,c6) ; } for (c6=1;c6<=M-1;c6++) { S11(c2,2,c6) ; } for (c6=1;c6<=M-1;c6++) { S10(c2,2,c6) ; } } } if ((M >= 2) && (N == 2)) { for (c2=1;c2<=O-1;c2++) { for (c6=1;c6<=M;c6++) { S1(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S6(c2,1,c6) ; S7(c2,1,c6) ; } for (c6=1;c6<=M;c6++) { S3(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S11(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S10(c2,1,c6) ; } } } if ((M == 1) && (N >= 3)) { for (c2=1;c2<=O-1;c2++) { for (c4=-1;c4<=0;c4++) { if ((c4+1)%2 == 0) { j = (c4+3)/2 ; S1(c2,(c4+3)/2,1) ; } } for (c4=1;c4<=2*N-5;c4++) { if ((c4+1)%2 == 0) { j = (c4+1)/2 ; S3(c2,(c4+1)/2,1) ; } if ((c4+1)%2 == 0) { j = (c4+3)/2 ; S1(c2,(c4+3)/2,1) ; } } for (c4=2*N-4;c4<=2*N-3;c4++) { if ((c4+1)%2 == 0) { j = (c4+1)/2 ; S3(c2,(c4+1)/2,1) ; } } } } if ((M == 1) && (N == 2)) { for (c2=1;c2<=O-1;c2++) { S1(c2,1,1) ; S3(c2,1,1) ; } } if ((M >= 2) && (N >= 3)) { for (c2=1;c2<=O-1;c2++) { for (c6=1;c6<=M;c6++) { S2(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S8(c2,1,c6) ; } for (c4=3;c4<=2*N-2;c4++) { for (c6=1;c6<=M;c6++) { if (c4%2 == 0) { S2(c2,c4/2,c6) ; } } for (c6=1;c6<=M-1;c6++) { if (c4%2 == 0) { S8(c2,c4/2,c6) ; } } for (c6=1;c6<=M-1;c6++) { if ((c4+1)%2 == 0) { j = (c4-1)/2 ; S9(c2,(c4-1)/2,c6) ; } } } c4 = 2*N-1 ; for (c6=1;c6<=M-1;c6++) { j = N-1 ; S9(c2,N-1,c6) ; } } } if ((M >= 2) && (N == 2)) { for (c2=1;c2<=O-1;c2++) { for (c6=1;c6<=M;c6++) { S2(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S8(c2,1,c6) ; } for (c6=1;c6<=M-1;c6++) { S9(c2,1,c6) ; } } } if ((M == 1) && (N >= 2)) { for (c2=1;c2<=O-1;c2++) { for (c4=2;c4<=2*N-2;c4++) { if (c4%2 == 0) { S2(c2,c4/2,1) ; } } } } if ((M >= 2) && (N >= 2)) { for (c2=1;c2<=O-1;c2++) { for (c4=1;c4<=N-1;c4++) { for (c6=1;c6<=M-1;c6++) { S4(c2,c4,c6) ; } } } } if ((M >= 2) && (N >= 2)) { for (c2=1;c2<=O-1;c2++) { for (c4=1;c4<=N-1;c4++) { for (c6=1;c6<=M-1;c6++) { S5(c2,c4,c6) ; } } } } if ((M >= P+1) && (N >= Q+1)) { for (c2=R;c2<=O-1;c2++) { for (c4=Q;c4<=N-1;c4++) { for (c6=P;c6<=M-1;c6++) { S12(c2,c4,c6) ; } } } } if ((M >= 2) && (N >= Q+1)) { for (c2=R;c2<=O-1;c2++) { for (c4=Q;c4<=N-1;c4++) { for (c6=1;c6<=M-1;c6++) { S13(c2,c4,c6) ; } } } } if ((M >= P+1) && (N >= 2)) { for (c2=R;c2<=O-1;c2++) { for (c4=1;c4<=N-1;c4++) { for (c6=P;c6<=M-1;c6++) { S14(c2,c4,c6) ; } } } } if ((M >= 2) && (N >= 2)) { for (c2=R;c2<=O-1;c2++) { for (c4=1;c4<=N-1;c4++) { for (c6=1;c6<=M-1;c6++) { S15(c2,c4,c6) ; } } } } }