Skip to content

Instantly share code, notes, and snippets.

@aaronpk
Last active August 29, 2015 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronpk/5cbe2b53cfe566f356cb to your computer and use it in GitHub Desktop.
Save aaronpk/5cbe2b53cfe566f356cb to your computer and use it in GitHub Desktop.
links = [
{:a => :z},
{:b => :z},
{:c => :z},
{:d => :y},
{:e => :x},
{:e => :w},
{:e => :v},
{:f => :u},
{:f => :t},
{:g => :t}
]
expected_clusters = [
{:sources => [:a,:b,:c], :targets => [:z], :text => "a, b and c linked to z"},
{:sources => [:d], :targets => [:y], :text => "d linked to y"},
{:sources => [:e], :targets => [:x,:w,:v], :text => "e linked to x, w, and v"},
{:sources => [:f,:g], :targets => [:u,:t], :text => "f and g linked to u and t"}
]
@aaronpk
Copy link
Author

aaronpk commented Jul 26, 2015

digraph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment