graphvix v0.3.0 Graphvix.Edge
Summary
Functions
Deletes the edge with the provided edge_id
Find the edge in the graph that has the provided edge_id
Adds an edge to the graph connecting node1 and node2
Updates the attributes for an edge with the provided edge_id
Types
Functions
Deletes the edge with the provided edge_id.
Does nothing if the edge does not exist.
iex> e = Edge.new(n1, n2)
iex> Edge.delete(e.id)
Find the edge in the graph that has the provided edge_id.
Returns the edge, or nil if it is not found.
iex> e = Edge.new(n1, n2)
iex> Edge.find(e.id) #=> returns `e`
Adds an edge to the graph connecting node1 and node2.
The edge sets its starting attributes to attrs.
Edges can be created by passing node ids or nodes themselves.
iex> n1 = Node.new
iex> n2 = Node.new
iex> n3 = Node.new
iex> Edge.new(n1.id, n2.id) # or
iex> Edge.new(n2, n3)
Updates the attributes for an edge with the provided edge_id.
If nil is passed as a value in the attrs keyword list, it will remove
the key entirely from the edge’s attributes.
iex> e = Edge.new(n1, n2, color: "blue")
iex> Edge.update(e.id, color: nil, label: "Connection")