function d = flstMakeData(mdl, memory)

% makeFLSTData just returns a struct that contains all the necessary data 
% for a Fixed Lag Sparse Transition Viterbi decoder.

init = mdl.init;
transFrom = mdl.transFrom;
transTo = mdl.transTo;
transProb = mdl.transProb;

d = struct();
d.init = init(:);
d.from = transFrom;
d.to = transTo;
d.prob = transProb;
d.memory = memory;
d.nState = length(init);
d.nTrans = length(transFrom);
d.delta = ones(d.nState, 1) / d.nState;
d.oldDelta = ones(d.nState, 1) / d.nState;
d.psi = zeros(d.nState, memory);
d.scale = ones(1, memory);
d.updateCount = 0;
d.path = [];
