pub fn get_boundary_edges<T, V>(
treetn: &TreeTN<T, V>,
region: &[V],
) -> Result<Vec<BoundaryEdge<T, V>>>Expand description
Get all boundary edges for a given region in a TreeTN.
Returns edges connecting nodes inside the region to neighbors outside the region. This is useful for maintaining stable bond IDs across updates (e.g., for environment cache consistency).
§Arguments
treetn- The TreeTN to analyzeregion- Nodes that are inside the region
§Returns
Vector of boundary edges, each containing the node in region, neighbor outside, and bond index.