
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HotLog (Higher-order TopLog)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:-['HotLog.pl'].


summary_results(Index,SampleSize):-
	findall(Ele,(one_list(L),nth(Index,L,Ele)),NumList),%write(NumList),nl,	
	average(NumList,Average),write(SampleSize),write(' '),write(Average),
	std(NumList,Average,STD),StandardError is STD/sqrt(200),
	write(' '),write(StandardError),nl.

one_list(L):-oneProblem_allSizesPA(L).
one_list(L):-oneProblem_allSizesTime(L).


%:-['./datasets/context_free_grammar/experiments/sample_generation/regular_grammar/metaGol200_result_switched/allTime_prolog.txt'].

% Inputfile2 include all the oneProblem_allSize
:-	yap_flag(argv,[InputFile1,InputFile2]),
	consult(InputFile2),
Indexes=[1,2,3,4,5,6,7,8,9,10,11,12,13],
SampleSizes=[2,4,6,8,10,12,14,16,18,20,30,40,50],
%atom_concat(['summary',InputFile2],FileName),
%tell(FileName),
maplist(summary_results,Indexes,SampleSizes).
%told.




