You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building on from #499, given we have a finite number of edge kinds and restrictions on their use, we should have specific methods for querying those connections. I propose:
// just value portsfnvalue_ports(&self,node:Node,direction:Direction) -> Self::PortLinks<'_>;fnvalue_neighbours(&self,node:Node,direction:Direction) -> Self::Neighbours<'_>;// companion to linked_ports, a linear value port must have one targetfnlinked_liner_port(&self,node:Node,port:Port) -> Option<(Node,Port)>;// all Value + Order neighboursfndataflow_neighbours(&self,node:Node,direction:Direction) -> Self::Neighbours<'_>;fnorder_neighbours(&self,node:Node,direction:Direction) -> implIterator<Item=Node>;// can only be one static inputfnstatic_source(&self,node:Node) -> Option<Node>;// can be many static targets from one portfnstatic_targets(&self,node:Node) -> implIterator<Node>;// same as static but for cfg nodesfnprevious_block(&self,node:Node) -> Option<Node>;fnnext_blocks(&self,node:Node) -> implIterator<Node>;
with these we should be able to minimise/nullify the use of OpType methods like other_edge_kindstatic_portother_edge_port (so this is also an alternative to #495)
The text was updated successfully, but these errors were encountered:
- [x] Closes#495
- [x] Closes#521
- [x] Closes#655
- [x] Closes#499
- [x] Closes#506
- [x] Closes#653
- [x] `OpType::signature` returns option (non-dataflow ops don't return
signature)
- [x] Implement `try_into` from OpType references in to inner
references.
Doesn't necessarily do exactly as those issues specify - instead
considers them holistically for a more unified interface. Easiest to
review commit by commit.
Uses rust_version crate to use return position impl for the new
`HugrView` methods that return iterators. This will be stable with 1.75
(which enters beta in a few days).
BREAKING_CHANGES: `OpType` and `FunctionType` methods renamed for
clarity; `OpType::signature` returns `Option<FuncType>`.
Building on from #499, given we have a finite number of edge kinds and restrictions on their use, we should have specific methods for querying those connections. I propose:
with these we should be able to minimise/nullify the use of
OpType
methods likeother_edge_kind
static_port
other_edge_port
(so this is also an alternative to #495)The text was updated successfully, but these errors were encountered: