Point cloud utilities manual

File Readers

gudhi.read_points_from_off_file()

Read points from OFF file.

Parameters

off_file (string) – An OFF file style name.

Returns

The point set.

Return type

List[List[float]]

gudhi.read_lower_triangular_matrix_from_csv_file()

Read lower triangular matrix from a CSV style file.

Parameters
  • csv_file (string) – A CSV file style name.

  • separator (char) – The value separator in the CSV file. Default value is ‘;’

Returns

The lower triangular matrix.

Return type

List[List[float]]

Subsampling

gudhi.subsampling.choose_n_farthest_points()

Subsample by a greedy strategy of iteratively adding the farthest point from the current chosen point set to the subsampling. The iteration starts with the landmark starting point.

Parameters

points (Iterable[Iterable[float]]) – The input point set.

Or

Parameters

off_file (string) – An OFF file style name.

And in both cases

Parameters
  • nb_points (unsigned.) – Number of points of the subsample.

  • starting_point (unsigned.) – The iteration starts with the landmark starting point,which is the index of the point to start with. If not set, this index is chosen randomly.

Returns

The subsample point set.

Return type

List[List[float]]

gudhi.subsampling.pick_n_random_points()

Subsample a point set by picking random vertices.

Parameters

points (Iterable[Iterable[float]]) – The input point set.

Or

Parameters

off_file (string) – An OFF file style name.

And in both cases

Parameters

nb_points (unsigned.) – Number of points of the subsample.

Returns

The subsample point set.

Return type

List[List[float]]

gudhi.subsampling.sparsify_point_set()

Outputs a subset of the input points so that the squared distance between any two points is greater than or equal to min_squared_dist.

Parameters

points (Iterable[Iterable[float]]) – The input point set.

Or

Parameters

off_file (string) – An OFF file style name.

And in both cases

Parameters

min_squared_dist (float.) – Minimum squared distance separating the output points.

Returns

The subsample point set.

Return type

List[List[float]]