pybtls.utils.IL_compress.compress_discrete_IL#

compress_discrete_IL(x, y, e)[source]#

Compresses a set of discrete points (x, y)

by removing points that are within a certain error tolerance e of a line connecting the start point to a trial point.

Returns the compressed set of points as two separate lists.

Parameters:
  • x (list[float]) – List of x-coordinates of the points.

  • y (list[float]) – List of y-coordinates of the points.

  • e (float) – Maximum relative error allowed for a point to be considered part of the line.

Returns:

A tuple containing two lists: the compressed x-coordinates and the compressed y-coordinates.

Return type:

tuple[list, list]