ordered_boundary_edges#
- iskra.topology.ordered_boundary_edges(edges: Tensor) list[Tensor][SOURCE]#
Orders boundary edges into contiguous loops.
Given a set of undirected edges (typically the output of
boundary()), finds each connected component of the edge graph and returns the edges of that component in a depth-first traversal order. Each component therefore forms a contiguous walk along a boundary loop.Warning
This function is executed on the CPU.
- Parameters:
edges (
Tensor[Int64, [E, 2]]) – Edge-vertex indices, e.g. boundary edges fromboundary().- Returns:
(list[
Tensor[Int64, [Ec, 2]]]) – One tensor of ordered edges per connected component of the edge graph.Ecis the number of edges in that component. Components with no edges are omitted.