graphvix v0.3.0 Graphvix.Node
Summary
Functions
Deletes the node with the provided node_id
Find the node in the graph that has the provided node_id
Create a new node with the given attrs and attach it to the active graph
Update the attributes of the node with the provided node_id
Functions
Deletes the node with the provided node_id.
This will also remove any edges attached to the node, and remove it from any clusters it belongs to.
iex> Node.delete(1)
Find the node in the graph that has the provided node_id.
Returns the node, or nil if it is not found.
iex> n = Node.new(label: "Start")
iex> Node.find(n.id) #=> returns `n`
Create a new node with the given attrs and attach it to the active graph.
Returns the map of the node with a unique id.
iex> Node.new(label: "Start")
%{ id: 1, attrs: [label: "Start"] }
Update the attributes of the node with the provided node_id.
If nil is passed as a value in the attrs keyword list, it will remove
the key entirely from the node’s attributes.
iex> n = Node.new(label: "Start")
iex> Node.update(n.id, color: "blue", label: nil)