ライブラリ
- ビルトイン (31)
-
cgi
/ core (60) -
cgi
/ session (24) - csv (3)
- date (4)
- dbm (12)
- gdbm (12)
- json (60)
- openssl (96)
-
rubygems
/ config _ file (36) -
rubygems
/ specification (24) - sdbm (12)
- tsort (58)
-
webrick
/ httpresponse (12) -
win32
/ registry (36) -
yaml
/ dbm (12)
クラス
-
CGI
:: Session (24) -
CSV
:: Row (3) - DBM (12)
- Data (3)
- Date (2)
- DateTime (2)
- GDBM (12)
-
Gem
:: ConfigFile (36) -
Gem
:: Specification (24) -
JSON
:: Parser (12) -
JSON
:: State (48) - MatchData (2)
- Module (12)
-
OpenSSL
:: Config (12) -
OpenSSL
:: OCSP :: BasicResponse (12) -
OpenSSL
:: PKey :: EC :: Group (24) -
OpenSSL
:: PKey :: EC :: Point (12) -
OpenSSL
:: SSL :: SSLContext (36) - Proc (6)
- SDBM (12)
- Struct (6)
- Time (2)
-
WEBrick
:: HTTPResponse (12) -
Win32
:: Registry (36) -
YAML
:: DBM (12)
モジュール
-
CGI
:: QueryExtension (60) - TSort (58)
キーワード
- [] (36)
- []= (24)
- configure (12)
- create (12)
-
deconstruct
_ keys (20) - disposition (12)
- each (36)
-
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - fetch (48)
-
has
_ key? (12) - include? (12)
- indent (12)
- indent= (12)
- key= (12)
- key? (12)
- keys (12)
- merge (12)
-
on
_ curve? (12) - open (12)
- parse (12)
-
point
_ conversion _ form (12) -
point
_ conversion _ form= (12) -
ruby2
_ keywords (18) -
set
_ params (12) - sign (12)
-
signing
_ key (12) -
signing
_ key= (12) -
strongly
_ connected _ components (12)
検索結果
先頭5件
- OpenSSL
:: SSL :: SSLContext # key -> OpenSSL :: PKey :: PKey | nil - 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| . . . } -> ()
-
OpenSSL
:: SSL :: SSLContext # key -> OpenSSL :: PKey :: PKey | nil (21308.0) -
OpenSSL::SSL::SSLContext#cert で得られる自分自身を証明するための 証明書の公開鍵に対応する秘密鍵を返します。
...OpenSSL::SSL::SSLContext#cert で得られる自分自身を証明するための
証明書の公開鍵に対応する秘密鍵を返します。
@see OpenSSL::SSL::SSLContext#key=... -
TSort
# each _ strongly _ connected _ component -> Enumerator (18307.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.e......ach_strongly_connected_component{|nodes|
p nodes
}
#出力
#=> [4]
#=> [2, 3]
#=> [1]
//}
@see TSort.each_strongly_connected_component... -
TSort
# each _ strongly _ connected _ component {|nodes| . . . } -> nil (18307.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.e......ach_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 (18307.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......(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| . . . } -> () (18307.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......(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
# strongly _ connected _ components -> Array (18307.0) -
強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。
...rt'
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
:: PKey :: EC :: Group # point _ conversion _ form -> Symbol (15201.0) -
点のエンコーディング方式を返します。
...:compressed
* :uncompressed
* :hybrid
詳しくは X9.62 (ECDSA) などを参照してください。
@raise OpenSSL::PKey::EC::Group::Error 得られたエンコーディングが未知の値であった
場合に発生します。
@see OpenSSL::PKey::EC::Group#point_conversion_form=... -
OpenSSL
:: PKey :: EC :: Group # point _ conversion _ form=(sym) (15201.0) -
点のエンコーディング方式を設定します。
...エンコーディング方式を設定します。
以下のいずれかを設定します。
* :compressed
* :uncompressed
* :hybrid
詳しくは X9.62 (ECDSA) などを参照してください。
@param sym 設定する方式(Symbol)
@see OpenSSL::PKey::EC::Group#point_conversion_form... -
CSV
:: Row # deconstruct _ keys(keys) -> Hash (12301.0) -
パターンマッチに使用するヘッダの名前と値の Hash を返します。
...が文字列かつ Hash パターン でパターンマッチしたい場合はキーをシンボルに変換する必要があります。
@param keys パターンマッチに使用するヘッダの名前の配列を指定します。nil の場合は全てをパターンマッチに使用しま....... }
puts "all 2 or more"
in { header1: ...2, header2: 2.., header3: 2.. }
puts "first column is less than 2, and rest columns are 2 or more"
end
#=> "first column is less than 2, and rest columns are 2 or more" が出力される
//}
@see d:spec/pattern_matching#matching_non_primitive_objects... -
Data
# deconstruct _ keys(array _ of _ names _ or _ nil) -> Hash (12201.0) -
self のメンバの名前と値の組を Hash で返します。
...。
//emlist[例][ruby]{
Measure = Data.define(:amount, :unit)
distance = Measure.new(10, 'km')
distance.deconstruct_keys(nil) # => {:amount=>10, :unit=>"km"}
distance.deconstruct_keys([:amount]) # => {:amount=>10}
//}
このメソッドは以下のようにパターンマッチで利用さ......define(:amount, :unit)
distance = Measure.new(10, 'km')
case distance
in amount:, unit: 'km' # 裏側で #deconstruct_keys を呼ぶ
puts "It is #{amount} kilometers away"
else
puts "Don't know how to handle it"
end
# "It is 10 kilometers away" が表示される
# 以下のようにも書け......ます。
[注意] 本メソッドの記述は Data のサブクラスのインスタンスに対して呼び
出す事を想定しています。Data.define は Data のサブクラスを作成する点に
注意してください。
@see d:spec/pattern_matching#matching_non_primitive_objects...