Convert ij indexes to k indexes for a dist object
dist_ij_k(i, j, size)
i
row indexes
j
column indexes
size
value of size attribute of the dist object
k indexes
dist_ij_k(1:3, 4:6, 10)