neuroarch.na.NeuroArch.link
- NeuroArch.link(node1, node2, edge_type=None, **attr)[source]
To create an edge between node1 and node2 with specified edge type.
- Parameters:
node1 (models.Node or subclass) – The node where the edge starts from.
node2 (models.Node or subclass) – The node where the edge ends with.
edge_type (str (optional)) – The name of the type of the edge (relation). If edge_type not given, infer from the types of nodes.
attr (dict (optional)) – Attributes of the edge.
- Returns:
edge – The created edge.
- Return type:
models.Relationship or subclass