2 ***********************************************************
4 $HeadURL: svn://dig.cs.gc.cuny.edu/snark/trunk/src/snark/fom_klds.c $
5 $LastChangedRevision: 85 $
6 $Date: 2014-07-02 16:07:08 -0400 (Wed, 02 Jul 2014) $
8 ***********************************************************
11 // Extracts the weighted squared distance as a fom
14 #include "experimenter.h"
15 #include "read_eval_recon4.h"
18 This function reads the weighted squared 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 wsqd1 - array of length niters containing the weighted squared distance for the first algorithm
29 wsqd2 - array of length niters containing the weighted squared distance for the second algorithm
31 void fom_weighted_squared_distance(int* itr1, int* itr2, int niters,
32 char* keywrd1, char* keywrd2, double* wsqd1, double* wsqd2) {
34 double dummy_for_klds;
35 for (i = 0; i < niters; i++) {
36 read_eval_recon4(itr1[i], keywrd1, &dummy_for_klds, &wsqd1[i]);
37 read_eval_recon4(itr2[i], keywrd2, &dummy_for_klds, &wsqd2[i]);