logo
pub struct NodeFactory<NodeId = IdentityWithInt, EdgeId = IdentityWithInt, Kind = NodeKindless> where
    NodeId: IdentityInterface,
    EdgeId: IdentityInterface + IdentityGenerableInterface,
    Kind: NodeKindInterface,
    NodeFactory<NodeId, EdgeId, Kind>: NodeFactoryInterface
{ pub id_to_node_map: IndexMap<NodeId, Node<NodeId, EdgeId, Kind>, RandomState>, pub id_to_edge_map: IndexMap<EdgeId, Edge<EdgeId, NodeId, Kind>, RandomState>, pub _current_edge_id: EdgeId, }
Expand description

Node factory.

Fields

id_to_node_map: IndexMap<NodeId, Node<NodeId, EdgeId, Kind>, RandomState>

Map id to node.

id_to_edge_map: IndexMap<EdgeId, Edge<EdgeId, NodeId, Kind>, RandomState>

Map id to edge.

_current_edge_id: EdgeId

Generator of edge ids.

Trait Implementations

Formats the value using the given formatter. Read more

Iterate over all edges.

Number of edges. Size of the graph.

Either make new or get existing edge for specified nodes.

Either make new or get existing edge for specified nodes.

Either make new or get existing edge for specified nodes.

Handle of an edge - entity representing an edge or the edge itself. It’s not always possible to operate an edge directly, for example it it has to be wrapped by cell ref. For that use NodeHandle. Otherwise EdgeHandle could be &Node. Read more

Get edge with id.

Iterate over output edges of the node. Callback gets ids of nodes in neighbourhood of a picked node.

Convert argument into edge id.

Convert argument into edge id.

Iterate over output edges of the node. Callback gets ids and references of edges in neighbourhood of a picked node.

Iterate over all nodes.

Number of nodes. Order of the graph.

Iterate output nodes of the node.

Get node with id mutably.

Either make new or get existing node.

Add out edges to the node.

Make edges.

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. Read more

Get node with id.

Iterate over neighbourhood of the node. Callback gets ids of nodes in neighbourhood of a picked node.

Convert argument into node id.

Convert argument into node id.

Iterate over neighbourhood of the node. Callback gets ids and reference on itself of nodes in neighbourhood of a picked node.

Constructor without arguments.

Constructor without arguments.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Performs the conversion.