Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

AsymmetricDistanceComputation.m 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. function [ iXMinDist ] = AsymmetricDistanceComputation(CSubSetMat, iXQ, YSetMat, nRecall)
  2. %UNTITLED Summary of this function goes here
  3. % Detailed explanation goes here
  4. kk=size(CSubSetMat,2);
  5. mm=size(CSubSetMat,3);
  6. imgSz=size(YSetMat,1);
  7. subImgSz=imgSz/mm;
  8. Ntests=size(YSetMat,2);
  9. DistMat=zeros(kk,mm);
  10. iXMinDist=zeros(Ntests,nRecall);
  11. for ii=1:Ntests
  12. for jj=1:mm
  13. DistMat(:,jj)=EuclideanDistancesMat(YSetMat((jj-1)*subImgSz+1:jj*subImgSz,ii),CSubSetMat(:,:,jj));
  14. end
  15. DistVec = SumCentroidsDistances(DistMat,iXQ);
  16. [~, iXMinDisttemp] = sort (DistVec);
  17. maxRec=size(iXMinDisttemp,2);
  18. if maxRec >= nRecall
  19. iXMinDist(ii,:)=iXMinDisttemp(:, 1:nRecall);
  20. else
  21. ouch=size(iXMinDisttemp,1);
  22. iXMinDist(ii,:)=[iXMinDisttemp, zeros(1,nRecall-maxRec)];
  23. end
  24. pp=double(ii/Ntests*100);
  25. if(pp<10)
  26. %fprintf('\b\b\b\b\b\b %2.2f%%',pp);
  27. else
  28. %fprintf('\b\b\b\b\b\b\b %2.2f%%',pp);
  29. end
  30. end
  31. % for rr=1:Ntests
  32. % for ii=1:Ntr
  33. % SEucDist=0;
  34. %
  35. % for jj=1:m
  36. % SEucDist=SEucDist+dEucXCent(iYQ(rr,jj),ii,jj)^2;
  37. % end
  38. % TEucDist(ii)=sqrt(SEucDist);
  39. % end
  40. % pp=rr/Ntests*100;
  41. % if(pp<10)
  42. % fprintf('\b\b\b\b\b\b%2.2f %%',pp);
  43. % else
  44. % fprintf('\b\b\b\b\b\b\b%2.2f %%',pp);
  45. % end
  46. % [~,indMin]=min(TEucDist);
  47. % iXMinDist(rr)=indMin;
  48. % end
  49. end