% setup_combos_fake() for use with x98.m
% sets fake unique_perms to avoid run-time bottleneck
%
function setup_combos_fake()

global perms;
global combos;
global unique_perms;
global MP;
global M;
global perm_offset;

global K;
global MM_max;

perms = permutations(1:K);
MP = size(perms,2);

combos = combinations( 1:MM_max, K);
M = size(combos,2);

for i = K-1:-1:1
  tc = combinations( 1:MM_max, i);
  tc = [tc; (MM_max+1)*ones(K-i,size(tc,2))];	% K-i missed target events
  combos = [combos, tc];
end

combos = [combos, (MM_max+1)*ones(K,1)];	% K missed target events

M = size(combos,2);

unique_perms = [1:MP]' * ones(1,M);

% perm_offset is needed by get_perm()
%
perm_offset = [0:K-1]'*((MM_max+1)*ones(1,MP));
