class Silicium::Graphs::Graph

Attributes

nodes[RW]

Public Class Methods

new() click to toggle source
# File lib/topological_sort.rb, line 8
def initialize
  @nodes = []
end

Public Instance Methods

add_edge(from, to) click to toggle source
# File lib/topological_sort.rb, line 12
def add_edge(from, to)
  from.adjacents << to
end