Sha256: 7fb96fe85873a4fb035fddbecf4e15d631f49f9983f5946dfd850fa27d03ea72

Contents?: true

Size: 1.69 KB

Versions: 23

Compression:

Stored size: 1.69 KB

Contents

#!/usr/bin/ruby

$:.unshift( "../lib" );
require "graphviz"

GraphViz::options( :use => "dot" )

if ARGV[0]
  GraphViz::options( :path => ARGV[0] )
end

GraphViz::new( "g", :rankdir => "LR", :type => "digraph" ) { |g|
  g.node[:fontsize] = "16"
  g.node[:shape] = "record"
  
  g.node0( :label => "<f0> 0x10ba8| <f1>" )
  g.node1( :label => "<f0> 0xf7fc4380| <f1> | <f2> |-1" )
  g.node2( :label => "<f0> 0xf7fc44b8| | |2" )
  g.node3( :label => "<f0> 3.43322790286038071e-06|44.79998779296875|0" )
  g.node4( :label => "<f0> 0xf7fc4380| <f1> | <f2> |2" )
  g.node5( :label => "<f0> (nil)| | |-1" )
  g.node6( :label => "<f0> 0xf7fc4380| <f1> | <f2> |1" )
  g.node7( :label => "<f0> 0xf7fc4380| <f1> | <f2> |2" )
  g.node8( :label => "<f0> (nil)| | |-1" )
  g.node9( :label => "<f0> (nil)| | |-1" )
  g.node10( :label => "<f0> (nil)| <f1> | <f2> |-1" )
  g.node11( :label => "<f0> (nil)| <f1> | <f2> |-1" )
  g.node12( :label => "<f0> 0xf7fc43e0| | |1" )
  
  g.add_edge( g.node0(:f0), g.node1(:f0) )
  g.add_edge( g.node0(:f1), g.node2(:f0) )
  g.add_edge( g.node1(:f0), g.node3(:f0) )
  g.add_edge( g.node1(:f1), g.node4(:f0) )
  g.add_edge( g.node1(:f2), g.node5(:f0) )
  g.add_edge( g.node4(:f0), g.node3(:f0) )
  g.add_edge( g.node4(:f1), g.node6(:f0) )
  g.add_edge( g.node4(:f2), g.node10(:f0) )
  g.add_edge( g.node6(:f0), g.node3(:f0) )
  g.add_edge( g.node6(:f1), g.node7(:f0) )
  g.add_edge( g.node6(:f2), g.node9(:f0) )
  g.add_edge( g.node7(:f0), g.node3(:f0) )
  g.add_edge( g.node7(:f1), g.node1(:f0) )
  g.add_edge( g.node7(:f2), g.node8(:f0) )
  g.add_edge( g.node10(:f1), g.node11(:f0) )
  g.add_edge( g.node10(:f2), g.node12(:f0) )
  g.add_edge( g.node11(:f2), g.node1(:f0) )
}.output( :png => "#{$0}.png" )

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ruby-graphviz-1.0.2 examples/sample20.rb
ruby-graphviz-1.0.1 examples/sample20.rb
ruby-graphviz-1.0.0 examples/sample20.rb
ruby-graphviz-0.9.21 examples/sample20.rb
ruby-graphviz-0.9.20 examples/sample20.rb
ruby-graphviz-0.9.19 examples/sample20.rb
ruby-graphviz-0.9.18 examples/sample20.rb
ruby-graphviz-0.9.17 examples/sample20.rb
ruby-graphviz-0.9.16 examples/sample20.rb
ruby-graphviz-0.9.15 examples/sample20.rb
ruby-graphviz-0.9.14 examples/sample20.rb
ruby-graphviz-0.9.13 examples/sample20.rb
ruby-graphviz-0.9.12 examples/sample20.rb
ruby-graphviz-0.9.11 examples/sample20.rb
ruby-graphviz-0.9.10 examples/sample20.rb
ruby-graphviz-0.9.9 examples/sample20.rb
ruby-graphviz-0.9.8 examples/sample20.rb
ruby-graphviz-0.9.7 examples/sample20.rb
ruby-graphviz-0.9.6 examples/sample20.rb
ruby-graphviz-0.9.5 examples/sample20.rb