equivalent_vertices#

ifermi.analysis.equivalent_vertices(vertices, tol=1e-05)[source]#

Find vertices that are equivalent (closer than a tolerance).

Note that the algorithm used is effectively recursive. If vertex a is within the tolerance of b, and b is within the tolerance of c, even if a and c and not within the tolerance, a, b, and c will be considered equivalent.

Parameters:
  • vertices (ndarray) – (n, 2) or (n, 3) float array of the vertices.

  • tol (float) – The distance tolerance for equivalence.

Return type:

ndarray

Returns:

(n, ) int array that maps each each vertex in the original vertex array to its equivalent.