clear;
clc;

dataDir = 'D:/SocialNets/Steam/Results_Test/BFS_50Att/results_GED/Iter2/';
files = dir(strcat(dataDir, 'res_Steam*.mat')); 
dateNow = clock;
dateNow = strcat(num2str(dateNow(1)),'_',num2str(dateNow(2)),'_', num2str(dateNow(3)),'_', num2str(dateNow(4)), num2str(dateNow(5)),'_', num2str(dateNow(6)));
outFile = sprintf('%sDumpResults_%s.txt',dataDir, dateNow);
fileID = fopen(outFile,'w');


for f = files'
    data = load(strcat(dataDir,f.name));
    for r = data.purity
%        fprintf(fileID,'\t%s',f.name);
        fprintf(fileID,'\t%s',data.file);
        fprintf(fileID,'\t%d\t',data.i);
        fprintf(fileID,'\t%d\t',data.iter);
%        fprintf(fileID,'\t%d',r.iteration);
        fprintf(fileID,'\t%d',r.graph_size);
        fprintf(fileID,'\t%d',r.graph_edges); %12.12.12
        fprintf(fileID,'\t%d',r.graph_attr_edges); % 12.12.12
        fprintf(fileID,'\t%d',r.num_missing_nodes_idx); 
        fprintf(fileID,'\t%d\t',r.num_missing_nodes);
        fprintf(fileID,'\t%d',r.num_placeholders);
        fprintf(fileID,'\t%d\t',r.affinity_calculation_type);
        fprintf(fileID,'\t%d',r.withAttr);
        fprintf(fileID,'\t%d',r.num_attr_nodes);
        fprintf(fileID,'\t%d',r.num_clusters_known);
        fprintf(fileID,'\t%d\t',r.score);
        fprintf(fileID,'\t%d\t',r.edit_distance);
%         fprintf(fileID,'\t%d',r.affinity_calc_time);
%         fprintf(fileID,'\t%d',r.reduce_dim_time);
%         fprintf(fileID,'\t%d',r.graph_predict_time);
%        fprintf(fileID,'\t%d',r.missing_nodes_mapping(1,1));
%        fprintf(fileID,'\t%d',r.missing_nodes_mapping(1,2));
%        fprintf(fileID,'\t%d',r.missing_nodes_mapping(1,3));
        fprintf(fileID,'\n');
    end
end

fclose(fileID);
LogMsg(sprintf('Completed DumpResults at%s',outFile));
