point_simplex_dist#

iskra.geometry.distances.point_simplex_dist(x: Tensor, simplices: Tensor) Tensor[SOURCE]#

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

Thin dispatcher to one of iskra.point_edge_dist, iskra.point_triangle_dist, or point_tetrahedron_dist. See documentation of these functions for more information.

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

  • simplices (Tensor[Float, [Bs2, S, Dim]]) – Set of simplices.

Raises:

NotImplementedError – Only supports edges, triangles, and tetrahedra.

Returns:

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