Reader utils reference manual

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

vector[vector[double]]

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

vector[vector[double]]

gudhi.read_persistence_intervals_grouped_by_dimension()

Reads a file containing persistence intervals. Each line might contain 2, 3 or 4 values: [[field] dimension] birth death The return value is an map[dim, vector[pair[birth, death]]] where dim is an int, birth a double, and death a double. Note: the function does not check that birth <= death.

Parameters

persistence_file (string) – A persistence file style name.

Returns

The persistence pairs grouped by dimension.

Return type

map[int, vector[pair[double, double]]]

gudhi.read_persistence_intervals_in_dimension()

Reads a file containing persistence intervals. Each line of persistence_file might contain 2, 3 or 4 values: [[field] dimension] birth death Note: the function does not check that birth <= death.

Parameters
  • persistence_file (string) – A persistence file style name.

  • only_this_dim (int.) – The specific dimension. Default value is -1. If only_this_dim = -1, dimension is ignored and all lines are returned. If only_this_dim is >= 0, only the lines where dimension = only_this_dim (or where dimension is not specified) are returned.

Returns

The persistence intervals.

Return type

numpy array of dimension 2