%function y = pair_distance(geometry, pairs)
%
% geometry: nDimensions-by-nMicrophones
% pairs:    nPairs-by-2
%
% y:        nPairs-by-1
%
% EXAMPLE:
% 
% d = pair_distance( g, p );
% maxdelay = d * fs / c;

function y = pair_distance(geometry, pairs)
g1 = geometry(:,pairs(:,1));   % For each pair, microphone 1
g2 = geometry(:,pairs(:,2));   % For each pair, microphone 2
y = transpose(sqrt(sum((g1-g2).^2, 1)));
