You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried running the example code from the README, but I'm stuck with an unexpected error. I'm running this on Debian 9, with Ruby 2.6.1.
I tried this code:
# maptest.rbrequire'ruby_vor'points=[RubyVor::Point.new(120,290),RubyVor::Point.new(110,120),RubyVor::Point.new(160,90.2),RubyVor::Point.new(3.14159265,3.14159265)]# Compute the diagram & triangulationcomp=RubyVor::VDDT::Computation.from_points(points)puts"The nearest-neighbor graph:"ppcomp.nn_graphputs"\nThe minimum-spanning tree:"ppcomp.minimum_spanning_tree# Just the triangulationRubyVor::Visualizer.make_svg(comp,:name=>'tri.svg')# Just the MSTRubyVor::Visualizer.make_svg(comp,:name=>'mst.svg',:triangulation=>false,:mst=>true)# Voronoi diagram and the triangulationRubyVor::Visualizer.make_svg(comp,:name=>'dia.svg',:voronoi_diagram=>true)
It results in this output:
The nearest-neighbor graph:
[[2, 1, 3], [3, 2, 0], [3, 1, 0], [1, 2, 0]]
The minimum-spanning tree:
Traceback (most recent call last):
3: from maptest.rb:17:in `<main>'
2: from maptest.rb:17:in `minimum_spanning_tree'
1: from /home/sage/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rubyvor-0.1.4/lib/ruby_vor/priority_queue.rb:60:in `push'
/home/sage/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/rubyvor-0.1.4/lib/ruby_vor/priority_queue.rb:60:in `percolate_up': no implicit conversion to float from nil (TypeError)
The text was updated successfully, but these errors were encountered:
I tried running the example code from the README, but I'm stuck with an unexpected error. I'm running this on Debian 9, with Ruby 2.6.1.
I tried this code:
It results in this output:
The text was updated successfully, but these errors were encountered: