point_edge_dist#

iskra.geometry.distances.point_edge_dist(x: Tensor, edges: Tensor) Tensor[SOURCE]#

Distance of a point to its closest point on an edge.

Implements point_dist(x, edge_project(x, edges)) using iskra.point_dist and iskra.edge_project. See documentation of these two functions for more information.

Parameters:
  • x (Tensor[Float, [Bs1, Dim]]) – Set of points.

  • edges (Tensor[Float, [Bs2, 2, Dim]]) – Set of edges.

Returns:

(Tensor[Float, [Bs3]]) – Distance of x to closest point on its corresponding edge. Bs3 is the broadcasted shape when broadcasting Bs1 and Bs2.