-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
parallels insert_hugr_nodes
but we'd want two trait methods, one for Hugr one for View, to handle copying-vs-moving node weights/data.
In fact the reroot
callback could be a HashMap<Node, Self::Node>
: the method is inserting a forest, and the map contains one entry per root of the inserted forest, so not many entries.
These methods would then be implemented for Hugr
by each calling the existing insert_hugr_nodes
plus its own bit for copying/moving node weights/data.
insert_hugr
and insert_region
etc. can then all be trait-default-implemented on top of that (using entry_descendants
and a single mapping from inserted entrypoint to parent
to preserve current behaviour).
Metadata
Metadata
Assignees
Labels
No labels