Trait wautomata::GraphNodesNominalInterface
source · [−]pub trait GraphNodesNominalInterface {
type NodeHandle: NodeBasicInterface;
fn node<Id>(&self, id: Id) -> &Self::NodeHandle
where
Id: Into<<Self::NodeHandle as HasId>::Id>;
fn out_nodes_ids<'a, 'b, Id>(
&'a self,
node_id: Id
) -> Box<dyn Iterator<Item = <Self::NodeHandle as HasId>::Id> + 'b, Global>
where
'a: 'b,
Id: Into<<Self::NodeHandle as HasId>::Id>;
fn NodeId<Id>(id: Id) -> <Self::NodeHandle as HasId>::Id
where
Id: Into<<Self::NodeHandle as HasId>::Id>,
{ ... }
fn node_id<Id>(&self, id: Id) -> <Self::NodeHandle as HasId>::Id
where
Id: Into<<Self::NodeHandle as HasId>::Id>,
{ ... }
fn out_nodes<'a, 'b, Id>(
&'a self,
node_id: Id
) -> Box<dyn Iterator<Item = (<Self::NodeHandle as HasId>::Id, &'a Self::NodeHandle)> + 'b, Global>
where
'a: 'b,
Id: Into<<Self::NodeHandle as HasId>::Id>,
{ ... }
}
Expand description
Graph which know how to iterate neighbourhood of a node and capable to convert id of a node into a node.
Required Associated Types
Handle of a node - entity representing a node or the node itself. It’s not always possible to operate a node directly, for example it it has to be wrapped by cell ref. For that use NodeHandle. Otherwise NodeHandle could be &Node.
Required Methods
fn node<Id>(&self, id: Id) -> &Self::NodeHandle where
Id: Into<<Self::NodeHandle as HasId>::Id>,
fn node<Id>(&self, id: Id) -> &Self::NodeHandle where
Id: Into<<Self::NodeHandle as HasId>::Id>,
Get node with id.
fn out_nodes_ids<'a, 'b, Id>(
&'a self,
node_id: Id
) -> Box<dyn Iterator<Item = <Self::NodeHandle as HasId>::Id> + 'b, Global> where
'a: 'b,
Id: Into<<Self::NodeHandle as HasId>::Id>,
fn out_nodes_ids<'a, 'b, Id>(
&'a self,
node_id: Id
) -> Box<dyn Iterator<Item = <Self::NodeHandle as HasId>::Id> + 'b, Global> where
'a: 'b,
Id: Into<<Self::NodeHandle as HasId>::Id>,
Iterate over neighbourhood of the node. Callback gets ids of nodes in neighbourhood of a picked node.
Provided Methods
fn NodeId<Id>(id: Id) -> <Self::NodeHandle as HasId>::Id where
Id: Into<<Self::NodeHandle as HasId>::Id>,
fn NodeId<Id>(id: Id) -> <Self::NodeHandle as HasId>::Id where
Id: Into<<Self::NodeHandle as HasId>::Id>,
Convert argument into node id.
fn node_id<Id>(&self, id: Id) -> <Self::NodeHandle as HasId>::Id where
Id: Into<<Self::NodeHandle as HasId>::Id>,
fn node_id<Id>(&self, id: Id) -> <Self::NodeHandle as HasId>::Id where
Id: Into<<Self::NodeHandle as HasId>::Id>,
Convert argument into node id.
fn out_nodes<'a, 'b, Id>(
&'a self,
node_id: Id
) -> Box<dyn Iterator<Item = (<Self::NodeHandle as HasId>::Id, &'a Self::NodeHandle)> + 'b, Global> where
'a: 'b,
Id: Into<<Self::NodeHandle as HasId>::Id>,
fn out_nodes<'a, 'b, Id>(
&'a self,
node_id: Id
) -> Box<dyn Iterator<Item = (<Self::NodeHandle as HasId>::Id, &'a Self::NodeHandle)> + 'b, Global> where
'a: 'b,
Id: Into<<Self::NodeHandle as HasId>::Id>,
Iterate over neighbourhood of the node. Callback gets ids and reference on itself of nodes in neighbourhood of a picked node.