triqs.gfs.plot.select_indices.closest_point_in_line

triqs.gfs.plot.select_indices.closest_point_in_line(x, L)[source]

Return the indices of the points in L closest to x (ties returned in order).

Parameters:
xsequence of float of length 2

Query point.

Lsequence of points

Candidate points to compare against.

Returns:
list of int

Indices in L whose distance to x equals the minimum.

Raises:
Exception

If L is empty.