diff options
Diffstat (limited to 'src/matrixOperations/chol/testDoubleChol.c')
-rw-r--r-- | src/matrixOperations/chol/testDoubleChol.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/matrixOperations/chol/testDoubleChol.c b/src/matrixOperations/chol/testDoubleChol.c index 4a89ba05..41138b1c 100644 --- a/src/matrixOperations/chol/testDoubleChol.c +++ b/src/matrixOperations/chol/testDoubleChol.c @@ -28,18 +28,26 @@ static void dcholsTest(void){ } static void dcholaTest(void){ + double in2[49]={0.2113249,0.7560439,0.0002211,0.3303271, 0.6653811,0.6283918,0.8497452 ,\ + 0.6857310,0.8782165,0.0683740,0.5608486,0.6623569,0.7263507,0.1985144 ,\ + 0.5442573, 0.2320748 , 0.2312237, 0.2164633, 0.8833888, 0.6525135, 0.3076091 ,\ + 0.9329616, 0.2146008 , 0.312642 , 0.3616361 , 0.2922267 , 0.5664249 , 0.4826472 ,\ + 0.3321719, 0.5935095, 0.5015342 , 0.4368588 , 0.2693125 , 0.6325745 , 0.4051954 ,\ + 0.9184708, 0.0437334, 0.4818509 , 0.2639556 , 0.4148104 , 0.2806498 , 0.1280058 ,\ + 0.7783129, 0.2119030, 0.1121355 ,0.6856896 ,0.1531217 ,0.6970851 ,0.8415518 }; double in[9]= {0.722725308034569025040,0.8976796260103583335877,0.2427821881137788295746,\ 0.4337721113115549087524,0.9677053210325539112091,0.5068534435704350471497,\ 0.523297640960663557053,0.5596947595477104187012,0.5617307000793516635895}; double res[9]={0.8501325238070644996213,0,0,\ 0.5102405791617476982225,0.8410468907315681308390,0,\ 0.6155483131232661886401,0.2920372626834314977451,0.3123222878611475739064}; - double out[9]; + double out[9]={0}, out2[49]={0}; int size=3; int i; printf("\n >>> DCholA <<<\n"); - + dchola(in2,7,out2); + for (i=0;i<49;i++)printf("out2[i]= %f\n",out2[i]); dchola(in,size,out); for (i=0;i<9;i++){ if (out[i]>1e-16) assert( (fabs(out[i]-res[i]) / fabs(out[i])) <1e-15); |