るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.013秒)
トップページ > クエリ:Hash[x] > クエリ:tsort_each[x] > 種類:ライブラリ[x]

別のキーワード

  1. tsort tsort_each
  2. tsort each_strongly_connected_component
  3. tsort each_strongly_connected_component_from
  4. tsort tsort
  5. tsort strongly_connected_components

検索結果

tsort (25.0)

tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。

...連結成分に関するモジュールを提供します。

=== Example

//emlist[][ruby]{
require 'tsort'

class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end

{1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tsort
#=> [3, 2, 1,...
...s_time
sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i
block.call
end
end
}
end

def tsort_each_child(node, &block)
@dep[node].each(&block)
end
include TSort
end

def command(arg)
print arg, "\n"
system arg
end

m = Make.new
m....