pyFM.mesh.geometry.farthest_point_sampling_distmat

pyFM.mesh.geometry.farthest_point_sampling_distmat(D, k, random_init=True, verbose=False)

Sample points using farthest point sampling from a complete distance matrix.

Parameters:
  • D ((n, n) np.ndarray) – Distance matrix between points.

  • k (int) – Number of points to sample.

  • random_init (bool, optional) – Whether to sample the first point randomly or to take the one furthest away from all the others.

  • verbose (bool, optional) – Whether to display a progress bar.

Returns:

fps – Array of indices of sampled points.

Return type:

(k,) np.ndarray