AUTH's THMMY "Parallel and distributed systems" course assignments.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

11 wiersze
447 B

  1. function [N, D] = mergeReducedResultsWithMink(N_sub, D_sub, C_sub, k, ~)
  2. % Merge reduced results for one subset of queries using mink
  3. numQueries = size(N_sub, 1); % Number of queries
  4. % Find the k smallest distances and their indices using mink
  5. [D, idx] = mink(D_sub, k, 2);
  6. % Select the corresponding neighbors based on the indices
  7. N = N_sub(sub2ind(size(N_sub), ...
  8. repmat((1:numQueries)', 1, k), idx));
  9. end