105 | | |
106 | | #if false |
107 | | // from testEpdf |
108 | | TEST(test_enorm_sum) { |
109 | | vec x = "-10:0.1:10"; |
110 | | vec y = "-10:0.1:10"; |
111 | | |
112 | | RV rv("{x2 }", "2"); |
113 | | vec mu0 = "0.0 0.0"; |
114 | | mat V0 = "5 -0.05; -0.05 5.20"; |
115 | | fsqmat R(V0); |
116 | | |
117 | | enorm<fsqmat> eN; |
118 | | eN.set_rv(rv); |
119 | | eN.set_parameters(mu0, R); |
120 | | |
121 | | vec pom(2); |
122 | | double suma = 0.0; |
123 | | for (int i = 0; i < x.length(); i++) { |
124 | | for (int j=0; j<y.length(); j++) { |
125 | | pom(0) = x(i); |
126 | | pom(1) = y(j); |
127 | | suma += exp(eN.evallog(pom)); |
128 | | } |
129 | | } |
130 | | |
131 | | CHECK_CLOSE(100, suma, 0.1); |
132 | | } |
133 | | #endif |