2 ***********************************************************
3 $SNARK_Header: S N A R K 1 4 - A PICTURE RECONSTRUCTION PROGRAM $
4 $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/fom_klds.c $
5 $LastChangedRevision: 137 $
6 $Date: 2014-07-15 16:38:33 -0400 (Tue, 15 Jul 2014) $
8 ***********************************************************
11 // Extracts the Kullback-Leibler distance as a fom
14 #include "experimenter.h"
15 #include "read_eval_recon4.h"
18 This function reads the kullback-leibler distance.
21 itr1 - array of length niters containing the iteration numbers for the first algorithm
22 itr2 - array of length niters containing the iteration numbers for the second algorithm
23 niters - number of iterations to be read
24 keywrd1 - string containing the keyword which defines the first algorithm
25 keywrd2 - string containing the keyword which defines the second algorithm
28 klds1 - array of length niters containing the kullback-leibler distances for the first algorithm
29 klds2 - array of length niters containing the kullback-leibler distances for the second algorithm
31 void fom_klds(int* itr1, int* itr2, int niters, char* keywrd1, char* keywrd2, double* klds1, double* klds2)
34 double dummy_wsqd = 0.0;
35 for (i = 0; i < niters; i++)
37 read_eval_recon4(itr1[i], keywrd1, &klds1[i], &dummy_wsqd);
38 read_eval_recon4(itr2[i], keywrd2, &klds2[i], &dummy_wsqd);