% SG 060417, revised 110917

clear
diary GGCCDvAP-KMIPvEM.txt

load('heaterTest0p125.mat')
fprintf('\n')

fprintf('Test set: heaterTest0.125\n\n')

fprintf('Generalised Greenfield-Chiclana Collapsing Defuzzifier')

GGCCD(heaterTest0p125, 'centroid');

fprintf('Timing for 1000 repetitions: \n')
repeats = 1000;
times = zeros(1, repeats);
for n = 1:repeats
    tic;
    GGCCDtiming(heaterTest0p125, 'centroid');
    times(n) = toc;
end
fprintf('Mean = %10.7f\t\t',mean(times))
fprintf('Standard Deviation = %10.7f\n',std(times))


fprintf('\nalpha-planes / Karnik-Mendel Iterative Procedure')

alphaPlanesKMIP2017(heaterTest0p125, 101);

fprintf('Timing for 1000 repetitions: \n')
repeats = 1000;
times = zeros(1, repeats);
for n = 1:repeats
    tic;
    alphaPlanesKMIP2017timing(heaterTest0p125, 101);
    times(n) = toc;
end
fprintf('Mean = %10.7f\t\t',mean(times))
fprintf('Standard Deviation = %10.7f\n',std(times))


fprintf('\nExhaustive Defuzzification\n')
exhaustiveGen(heaterTest0p125, 'centroid', 'centroid');
fprintf('\n')

clear

diary off