search_trees
pleat.search_trees ¶
Breadth-first search trees over half-edge graph elements.
Given a starting element (vertex or face) and a neighbour iterator, produce the edge list of a BFS spanning tree. Used to propagate orientation, colouring, and stacking-order constraints across a graph.
bfs_tree ¶
Compute a BFS spanning-tree edge list starting from a node or set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source
|
T | set[T]
|
A single starting node, or a set of starting nodes (forest root). |
required |
neighbor_iter
|
Callable[[T], Iterable[T]]
|
Function mapping a node to an iterable of its neighbours. |
required |
Returns:
| Type | Description |
|---|---|
list[tuple[T, T]]
|
|
Source code in pleat/search_trees.py
face_bfs_tree ¶
BFS tree over faces (interior faces only; None boundary faces are skipped).
vertex_bfs_tree ¶
BFS tree over vertices, traversing along incident edges.