ライブラリ
- ビルトイン (176)
-
cgi
/ core (72) -
cgi
/ session (36) -
cgi
/ session / pstore (12) - csv (27)
- date (4)
- dbm (12)
- drb (12)
- gdbm (12)
- json (156)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / ostruct (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / symbol (12) -
json
/ add / time (12) -
net
/ imap (24) - openssl (72)
- optparse (36)
-
rdoc
/ context (36) -
rdoc
/ top _ level (12) -
rexml
/ document (24) -
rubygems
/ command (24) -
rubygems
/ config _ file (24) - tsort (58)
-
webrick
/ cgi (12) -
webrick
/ httpresponse (24) -
webrick
/ server (12)
クラス
- Array (13)
- BigDecimal (12)
- CGI (24)
-
CGI
:: Session :: FileStore (12) -
CGI
:: Session :: MemoryStore (12) -
CGI
:: Session :: NullStore (12) -
CGI
:: Session :: PStore (12) -
CSV
:: Row (3) -
CSV
:: Table (24) - Complex (12)
- DBM (12)
-
DRb
:: DRbServer (12) - Data (3)
- Date (14)
- DateTime (14)
-
Encoding
:: Converter (48) - Exception (12)
- GDBM (12)
-
Gem
:: Command (24) -
Gem
:: ConfigFile (24) - Hash (24)
-
JSON
:: State (24) - MatchData (2)
- Module (12)
-
Net
:: IMAP (24) -
OpenSSL
:: Config (12) -
OpenSSL
:: SSL :: SSLContext (12) -
OpenSSL
:: X509 :: Extension (12) -
OpenSSL
:: X509 :: ExtensionFactory (36) - OpenStruct (12)
- OptionParser (24)
- Proc (6)
-
RDoc
:: Context (36) -
RDoc
:: Options (12) -
RDoc
:: TopLevel (12) -
REXML
:: Element (24) - Range (12)
- Rational (24)
- Regexp (12)
-
RubyVM
:: InstructionSequence (12) - String (36)
- Struct (18)
- Symbol (12)
- Time (14)
-
WEBrick
:: CGI (12) -
WEBrick
:: GenericServer (12) -
WEBrick
:: HTTPResponse (24)
モジュール
-
CGI
:: QueryExtension (48) -
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (36) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
OptionParser
:: Arguable (12) - TSort (58)
キーワード
- []= (12)
-
add
_ class _ or _ module (24) - clone (12)
- config (48)
- context (12)
- context= (12)
-
create
_ ext _ from _ hash (12) -
create
_ extension (24) -
deconstruct
_ keys (20) - dup (12)
- each (12)
-
each
_ strongly _ connected _ component (23) -
each
_ strongly _ connected _ component _ from (23) - encode (36)
- fetch (24)
- files (12)
- getopts (36)
- header (24)
- intersection (6)
- out (12)
- params (12)
- params= (12)
-
primitive
_ convert (48) - restore (48)
-
ruby2
_ keywords (18) -
set
_ params (12) -
show
_ hash (12) - starttls (24)
-
strongly
_ connected _ components (12) -
to
_ a (12) -
to
_ csv (12) -
to
_ h (24) -
to
_ hash (12) -
to
_ json (252) -
to
_ json _ raw (12) -
to
_ json _ raw _ object (12) -
to
_ s (12) - union (7)
-
unmatched
_ alias _ lists (12) -
unmatched
_ alias _ lists= (12)
検索結果
先頭5件
-
Gem
:: ConfigFile # hash -> Hash (21203.0) -
設定ファイルの各項目のキーと値を要素として持つハッシュです。
設定ファイルの各項目のキーと値を要素として持つハッシュです。 -
Rational
# hash -> Integer (21108.0) -
自身のハッシュ値を返します。
...自身のハッシュ値を返します。
@return ハッシュ値を返します。
@see Object#hash... -
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_ke......ach_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_ke......ach_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... -
Hash
# clone -> Hash (15203.0) -
selfと同じ内容を持つ新しいハッシュを返します。
...selfと同じ内容を持つ新しいハッシュを返します。
clone は frozen singleton-class の情報も含めてコピーしますが、
dup は内容と tainted だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり参......//emlist[例][ruby]{
h1 = {"have" => "have a","as" => "as a" }
h2 = h1.dup
h2["have"] = "has"
p h2 #=> {"have"=>"has", "as"=>"as a"}
p h1 #=> {"have"=>"have a", "as"=>"as a"}
h2["as"].upcase!
p h2 #=> {"have"=>"has", "as"=>"AS A"}
p h1 #=> {"have"=>"have a", "as"=>"AS A"}
//}
@see Object#clone......selfと同じ内容を持つ新しいハッシュを返します。
clone は frozen singleton-class の情報も含めてコピーしますが、
dup は内容だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり参照してい... -
JSON
:: Generator :: GeneratorMethods :: Hash # to _ json(state _ or _ hash = nil) -> String (12214.0) -
自身から生成した JSON 形式の文字列を返します。
...から生成した JSON 形式の文字列を返します。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を......指定します。
//emlist[例][ruby]{
require "json"
person = { "name" => "tanaka", "age" => 19 }
person.to_json # => "{\"name\":\"tanaka\",\"age\":19}"
//}...