graphvix v0.3.0 Graphvix.Cluster
Summary
Functions
Adds a node or nodes to an existing cluster identified by cluster_id
Deletes the cluster with the provided cluster_id
Find the cluster in the graph that has the provided cluster_id
Create a new cluster
Removes a node or nodes from an existing cluster identified by cluster_id
Types
Functions
Adds a node or nodes to an existing cluster identified by cluster_id
iex> c = Cluster.new
iex> n = Node.new
iex> Cluster.add(c.id, n)
Deletes the cluster with the provided cluster_id.
iex> Cluster.delete(1)
Find the cluster in the graph that has the provided cluster_id.
Returns the cluster, or nil if it is not found.
iex> c = Cluster.new
iex> Cluster.find(c.id) #=> returns `c`
Create a new cluster.
The cluster is empty by default, but can be provided with nodes
already part of it.
iex> n = Node.new
iex> n2 = Node.new
iex> Cluster.new # or
iex> Cluster.new(n) # or
iex> Cluster.new([n, n2])
Removes a node or nodes from an existing cluster identified by cluster_id
iex> n = Node.new
iex> c = Cluster.new(n)
iex> Cluster.remove(c.id, n)