Sha256: 28b8e50726069e619a970d600a8fa6de63a43e746111c948c025822c769faf45

Contents?: true

Size: 265 Bytes

Versions: 2

Compression:

Stored size: 265 Bytes

Contents

#!/usr/bin/env ruby
require 'kruskal'

kruskal = Kruskal::MinimumSpanningTree.new
reader = Kruskal::JsonIO.new(ARGF)

kruskal.run(reader)

writer = Kruskal::JsonIO.new(STDOUT)
kruskal.forest.each do |tree|
  tree.each do |relation|
    writer << relation
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kruskal-0.1.1 bin/kruskal
kruskal-0.1.0 bin/kruskal