<< Click to Display Table of Contents >> Navigation: Using SMILE Wrappers > Networks, nodes and arcs > Arcs |
Here are the Network class methods to add and delete arcs between nodes:
Java:
Network.addArc
Network.deleteArc
Python:
Network.add_arc
Network.delete_arc
R:
Network$addArc
Network$deleteArc
C#:
Network.AddArc
Network.DeleteArc
The graph defined by nodes and arcs in a Network class instance a directed acyclic graph (DAG) at all times. An attempt to add an arc which would create a cycle in the graph will cause an exception.
To inspect the graph structure, you can use the following methods:
Java:
Network.getParents
Network.getParentIds
Network.getChildren
Network.getChildIds
Python:
Network.get_parents
Network.get_parent_ids
Network.get_children
Network.get_child_ids
R:
Network$getParents
Network$getParentIds
Network$getChildren
Network$getChildIds
C#:
Network.GetParents
Network.GetParentIds
Network.GetChildren
Network.GetChildIds
The methods with the "Ids" suffix return the arrays of string identifiers of the related nodes, otherwise the arrays of integer node handles are used.