30件ヒット
[1-30件を表示]
(0.488秒)
検索結果
先頭3件
-
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) -> Enumerator (18233.0) -
node から到達可能な強連結成分についてのイテレータです。
...node から到達可能な強連結成分についてのイテレータです。
返す値は規定されていません。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示......_each_child(node, &block)
fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
non_sort.each_strongly_connected_component{|nodes|
p nodes
nodes.each {|node|
non_sort.each_strongly_connected_component_from(node){|ns|
printf("%s -> %s\n", node, ns.join("......,"))
}
}
}
#出力
#=> [4]
#=> 4 -> 4
#=> [2, 3]
#=> 2 -> 4
#=> 2 -> 2,3
#=> 3 -> 4
#=> 3 -> 3,2
#=> [1]
#=> 1 -> 4
#=> 1 -> 2,3
#=> 1 -> 1
//}
@see TSort.each_strongly_connected_component_from... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) {|nodes| . . . } -> () (18133.0) -
node から到達可能な強連結成分についてのイテレータです。
...node から到達可能な強連結成分についてのイテレータです。
返す値は規定されていません。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示......_each_child(node, &block)
fetch(node).each(&block)
end
end
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
non_sort.each_strongly_connected_component{|nodes|
p nodes
nodes.each {|node|
non_sort.each_strongly_connected_component_from(node){|ns|
printf("%s -> %s\n", node, ns.join("......,"))
}
}
}
#出力
#=> [4]
#=> 4 -> 4
#=> [2, 3]
#=> 2 -> 4
#=> 2 -> 2,3
#=> 3 -> 4
#=> 3 -> 3,2
#=> [1]
#=> 1 -> 4
#=> 1 -> 2,3
#=> 1 -> 1
//}
@see TSort.each_strongly_connected_component_from... -
NEWS for Ruby 2
. 2 . 0 (24.0) -
NEWS for Ruby 2.2.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...atrix#-@, Matrix#+@
* 追加: Vector#cross_product
* 追加: Vector#dot
* 追加: Vector#angle_with
* 追加: Vector.independent?, Vector#independent?
* pathname
* Pathname#/ は Pathname#+ のエイリアスです
* 追加: Pathname#birthtime
* rake
* Rake 10.4.0......2.4.2+%2F+2014-10-01
* tsort
* TSort.tsort_each, TSort.each_strongly_connected_component,
TSort.each_strongly_connected_component_from はブロックを省略すると Enumerator を返すようになりました。
* xmlrpc
* LibXMLStreamParser という新しいパーサーを......hread_blocking_region_begin -> rb_thread_call_without_gvl family
* rb_thread_blocking_region_end -> rb_thread_call_without_gvl family
* TRAP_BEG -> rb_thread_call_without_gvl family
* TRAP_END -> rb_thread_call_without_gvl family
* rb_thread_select -> rb_thread_fd_select
* struct...