function [Winners,Reconstructions]=CompetitionMESOM(Model,TestSamples)
% Winners=Linear indexes of the winning neurons for all the test samples
% Reconstructions=Reconstructions (winning prototypes) for all the test
%   samples

Prototypes=Model.Prototypes(:,:);
Distances=distance(Prototypes,TestSamples);
[MinDistances,Winners]=min(Distances,[],1);
Reconstructions=Prototypes(:,Winners);

