This function is used in 'P_Knear_rank' to compute the degrees
degree_distribution(G, sampleIDs)Numeric vector of degrees with the same length and order as sampleIDs
Integer or numeric matrix with two columns, where each row
represents a directed edge (from, to) in the k-NN graph
Integer vector of node indices for which to compute degrees