ライブラリ
クラス
- Array (17)
- DBM (22)
- Data (2)
- GDBM (33)
-
Gem
:: ConfigFile (11) - Hash (713)
-
JSON
:: Parser (11) - KeyError (14)
- Module (5)
-
OpenSSL
:: SSL :: SSLContext (11) - OpenStruct (9)
- PStore (11)
- Proc (5)
-
Rake
:: TaskArguments (22) - SDBM (11)
- Struct (11)
-
YAML
:: DBM (11)
モジュール
- Enumerable (17)
- GC (44)
- Kernel (11)
-
Net
:: HTTPHeader (33) - TSort (85)
- URI (22)
オブジェクト
- ENV (132)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Hash (11)
- InvalidHashTupleKey (11)
- KeyError (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) - [] (33)
- []= (11)
- assoc (22)
- cgi (11)
-
decode
_ www _ form (11) -
deconstruct
_ keys (2) - default (22)
-
default
_ proc (11) -
default
_ proc= (11) - delete (22)
-
delete
_ if (22) - dig (27)
- each (44)
-
each
_ key (22) -
each
_ pair (22) -
each
_ strongly _ connected _ component (21) -
each
_ strongly _ connected _ component _ from (21) -
each
_ value (22) -
encode
_ www _ form (11) - except (6)
- fetch (88)
- filter (24)
- filter! (24)
-
has
_ key? (11) -
has
_ value? (11) - include? (11)
- index (7)
- invert (11)
- key (18)
- key? (11)
- keys (11)
-
latest
_ gc _ info (22) -
mark
_ hashentry (11) - member? (11)
- merge (22)
- merge! (22)
- receiver (7)
- reject (88)
- reject! (22)
- root? (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
ruby2
_ keywords (10) -
ruby2
_ keywords _ hash? (5) - select (55)
-
set
_ params (11) - shift (11)
- slice (13)
- stat (22)
- store (11)
-
strongly
_ connected _ components (11) -
to
_ h (46) -
transform
_ keys (17) -
transform
_ keys! (17) - tsort (22)
-
tsort
_ each (21) - update (22)
- value? (11)
-
values
_ at (11) -
with
_ defaults (11) - パターンマッチ (11)
検索結果
先頭5件
- TSort
# each _ strongly _ connected _ component -> Enumerator - TSort
# each _ strongly _ connected _ component {|nodes| . . . } -> nil - TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) -> Enumerator - TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) {|nodes| . . . } -> () - TSort
# strongly _ connected _ components -> Array
-
TSort
# each _ strongly _ connected _ component -> Enumerator (12.0) -
TSort#strongly_connected_components メソッドのイテレータ版です。 obj.each_strongly_connected_component は obj.strongly_connected_components.each に似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
...ます。
each_strongly_connected_component は nil を返します。
//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
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}... -
TSort
# each _ strongly _ connected _ component {|nodes| . . . } -> nil (12.0) -
TSort#strongly_connected_components メソッドのイテレータ版です。 obj.each_strongly_connected_component は obj.strongly_connected_components.each に似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
...ます。
each_strongly_connected_component は nil を返します。
//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
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) -> Enumerator (12.0) -
node から到達可能な強連結成分についてのイテレータです。
...am node ノードを指定します。
//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
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) {|nodes| . . . } -> () (12.0) -
node から到達可能な強連結成分についてのイテレータです。
...am node ノードを指定します。
//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
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}... -
TSort
# strongly _ connected _ components -> Array (12.0) -
強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。
...れています。
各要素は強連結成分を表す配列です。
//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
non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}... -
TSort
# tsort -> Array (12.0) -
頂点をトポロジカルソートして得られる配列を返します。 この配列は子から親に向かってソートされています。 すなわち、最初の要素は子を持たず、最後の要素は親を持ちません。
...@raise TSort::Cyclic 閉路が存在するとき、発生します。
//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
sorted = {1=>[2, 3], 2=>[3], 3=>[], 4=>[]}.tso... -
TSort
# tsort _ each -> Enumerator (12.0) -
TSort#tsort メソッドのイテレータ版です。 obj.tsort_each は obj.tsort.each と似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
...。
@raise TSort::Cyclic 閉路が存在するとき、発生します.
//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
non_sort = {1=>[2, 3], 2=>[3], 3=>[], 4=>[]}... -
TSort
# tsort _ each {|node| . . . } -> nil (12.0) -
TSort#tsort メソッドのイテレータ版です。 obj.tsort_each は obj.tsort.each と似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
...。
@raise TSort::Cyclic 閉路が存在するとき、発生します.
//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
non_sort = {1=>[2, 3], 2=>[3], 3=>[], 4=>[]}... -
URI
. decode _ www _ form(str , enc=Encoding :: UTF _ 8) -> [[String , String]] (12.0) -
文字列から URL-encoded form data をデコードします。
...文字列から URL-encoded form data をデコードします。
application/x-www-form-urlencoded 形式のデータをデコードし、
[key, value] という形の配列の配列を返します。
enc で指定したエンコーディングの文字列が URL エンコードされたもの......#=> [['a', '1'], ['a', '2'], ['b', '3']]
p ary.assoc('a').last #=> '1'
p ary.assoc('b').last #=> '3'
p ary.rassoc('a').last #=> '2'
p Hash[ary] # => {"a"=>"2", "b"=>"3"}
@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str... -
tsort (12.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,......each_strongly_connected_component_from(target) {|ns|
if ns.length != 1
fs = ns.delete_if {|n| Array === n}
raise TSort::Cyclic.new("cyclic dependencies: #{fs.join ', '}")
end
n = ns.first
if Array === n
outputs, inputs, block = n
inputs_time =......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.rule(%w[t1]) { command 'date > t1' }
m.rule(%w[t2]) { command 'date > t2' }
m.rule(%w[t3]) { command 'date > t3' }
m.rule(%w[t4], %w[t1 t3]) { co...