ライブラリ
- ビルトイン (252)
- getoptlong (11)
-
net
/ http (22) - openssl (22)
-
rdoc
/ context (44) - set (22)
- socket (11)
- thread (12)
- tsort (53)
- win32ole (22)
クラス
- BasicSocket (11)
-
Enumerator
:: Lazy (22) - GetoptLong (11)
- IO (110)
- Object (11)
-
OpenSSL
:: ASN1 :: Constructive (11) -
OpenSSL
:: Config (11) -
RDoc
:: Context (44) - Set (22)
- StopIteration (11)
-
Thread
:: Queue (33) -
Thread
:: SizedQueue (33) -
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ TYPE (11)
モジュール
- Enumerable (44)
-
Net
:: HTTPHeader (22) - TSort (53)
キーワード
-
canonical
_ each (11) -
collect
_ concat (11) -
default
_ event _ sources (11) - deq (22)
-
each
_ attribute (11) -
each
_ capitalized (11) -
each
_ classmodule (11) -
each
_ cons (22) -
each
_ constant (11) -
each
_ line (55) -
each
_ method (11) -
each
_ strongly _ connected _ component (21) -
each
_ strongly _ connected _ component _ from (21) -
flat
_ map (11) - handler= (11)
- intersection (11)
- pop (22)
- recvmsg (11)
-
respond
_ to? (11) - result (11)
- shift (22)
-
slice
_ before (22) -
strongly
_ connected _ components (11) - union (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 (30677.0) -
TSort#strongly_connected_components メソッドのイテレータ版です。 obj.each_strongly_connected_component は obj.strongly_connected_components.each に似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
...
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=>[]}
non_sort.......each_strongly_connected_component{|nodes|
p nodes
}
#出力
#=> [4]
#=> [2, 3]
#=> [1]
//}
@see TSort.each_strongly_connected_component... -
TSort
# each _ strongly _ connected _ component {|nodes| . . . } -> nil (30677.0) -
TSort#strongly_connected_components メソッドのイテレータ版です。 obj.each_strongly_connected_component は obj.strongly_connected_components.each に似ていますが、 ブロックの評価中に obj が変更された場合は予期しない結果になる ことがあります。
...
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=>[]}
non_sort.......each_strongly_connected_component{|nodes|
p nodes
}
#出力
#=> [4]
#=> [2, 3]
#=> [1]
//}
@see TSort.each_strongly_connected_component... -
TSort
# each _ strongly _ connected _ component _ from(node , id _ map={} , stack=[]) -> Enumerator (30663.0) -
node から到達可能な強連結成分についてのイテレータです。
...せん。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示する][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(no......de, &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| . . . } -> () (30663.0) -
node から到達可能な強連結成分についてのイテレータです。
...せん。
each_strongly_connected_component_from は
tsort_each_node を呼びません。
@param node ノードを指定します。
//emlist[例 到達可能なノードを表示する][ruby]{
require 'tsort'
class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(no......de, &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
# strongly _ connected _ components -> Array (27525.0) -
強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。
...t[使用例][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=>[]}
p non_sort.strongly_connected_components
#=> [[4], [2, 3], [1]]
//}
@see TSort.......strongly_connected_components... -
OpenSSL
:: ASN1 :: Constructive # each {|item| . . . } -> self (24302.0) -
構造型のデータに含まれる各要素に対してブロックを 評価します。
構造型のデータに含まれる各要素に対してブロックを
評価します。 -
RDoc
:: Context # each _ constant {|c| . . . } -> [RDoc :: Constant] (21602.0) -
追加された RDoc::Constant に対してブロックを評価します。
...追加された RDoc::Constant に対してブロックを評価します。... -
OpenSSL
:: Config # each {|section , key , value| . . . } -> self (21408.0) -
オブジェクトに含まれる全ての設定情報を順にブロックに渡し 呼び出します。
...ssl'
conf = OpenSSL::Config.load(OpenSSL::Config::DEFAULT_CONFIG_FILE)
conf.each{|section, key, value| p [section, key, value]}
# => ["req_distinguished_name", "countryName", "Country Name (2 letter code)"]
# => ["req_distinguished_name", "countryName_default", "AU"]
# => ["req_distinguish......ed_name", "countryName_min", "2"]
# => :... -
RDoc
:: Context # each _ attribute {|a| . . . } -> [RDoc :: Attr] (18402.0) -
追加された RDoc::Attr に対してブロックを評価します。
...追加された RDoc::Attr に対してブロックを評価します。... -
IO
# each(limit , chomp: false) -> Enumerator (18367.0) -
IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。
...ます。
ブロックが与えられなかった場合は、自身から生成した
Enumerator オブジェクトを返します。
テキスト読み込みメソッドとして動作します。
limit で最大読み込みバイト数を指定します。ただしマルチバイト文字が途......mit 最大の読み込みバイト数
@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
//emlist[例: 引数なし][ruby]{
IO.write("testfi......le", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区切りに半角カ...