1199件ヒット
[1-100件を表示]
(0.083秒)
別のキーワード
ライブラリ
- ビルトイン (410)
-
cgi
/ core (48) - csv (36)
- date (4)
- json (60)
-
minitest
/ unit (2) -
net
/ imap (60) - openssl (36)
- optparse (180)
- rake (24)
-
rake
/ rdoctask (24) -
rdoc
/ context (12) -
rubygems
/ config _ file (12) -
rubygems
/ dependency _ installer (24) -
rubygems
/ dependency _ list (12) -
rubygems
/ requirement (12) -
rubygems
/ source _ info _ cache (12) -
rubygems
/ specification (96) -
rubygems
/ user _ interaction (24) -
rubygems
/ version (24) - set (9)
-
shell
/ process-controller (18) - socket (48)
- tsort (12)
クラス
- Array (220)
- BasicSocket (12)
- CSV (24)
- Data (3)
- Date (2)
- DateTime (2)
-
Encoding
:: Converter (24) -
Gem
:: ConfigFile (12) -
Gem
:: DependencyInstaller (24) -
Gem
:: DependencyList (12) -
Gem
:: Requirement (12) -
Gem
:: SourceInfoCache (12) -
Gem
:: Specification (96) -
Gem
:: StreamUI (12) -
Gem
:: Version (24) -
JSON
:: State (48) - MatchData (2)
- Module (36)
-
Net
:: IMAP (12) -
Net
:: IMAP :: BodyTypeBasic (12) -
Net
:: IMAP :: BodyTypeMessage (12) -
Net
:: IMAP :: BodyTypeMultipart (12) -
Net
:: IMAP :: BodyTypeText (12) -
OpenSSL
:: X509 :: ExtensionFactory (36) - OptionParser (144)
-
OptionParser
:: ParseError (36) -
RDoc
:: Context (12) -
Rake
:: Application (12) -
Rake
:: RDocTask (24) -
Rake
:: Task (12) - Rational (24)
-
RubyVM
:: InstructionSequence (12) - Set (12)
-
Shell
:: ProcessController (18) - Socket (12)
-
Socket
:: Option (12) - Struct (6)
- Time (2)
- UDPSocket (12)
モジュール
-
CGI
:: QueryExtension (24) -
CGI
:: QueryExtension :: Value (24) - Enumerable (90)
-
Gem
:: UserInteraction (12) -
JSON
:: Generator :: GeneratorMethods :: Array (12) -
MiniTest
:: Assertions (2) - TSort (12)
キーワード
- [] (12)
-
accept
_ nonblock (12) - actions (12)
-
active
_ jobs (6) -
add
_ bindir (12) -
add
_ to (12) - args (24)
-
array
_ nl (12) -
array
_ nl= (12) -
assert
_ send (1) -
capture
_ io (1) -
cert
_ chain (12) -
choose
_ from _ list (24) - clone (12)
- coerce (12)
-
collect
_ concat (24) - combination (24)
- concat (33)
- converters (12)
- convpath (12)
-
create
_ ext _ from _ array (12) -
create
_ extension (24) -
deconstruct
_ keys (17) - dependencies (12)
-
dependent
_ gems (12) -
development
_ dependencies (12) - dup (12)
- extension (48)
- fetch (12)
-
find
_ spec _ by _ name _ and _ version (12) -
flat
_ map (24) -
header
_ converters (12) - install (12)
- intersection (18)
- jobs (6)
-
marshal
_ dump (24) -
marshal
_ load (12) -
module
_ function (36) - none? (42)
- one? (42)
-
option
_ list (12) - params (12)
- permutation (24)
-
primitive
_ errinfo (12) - recover (12)
-
recvfrom
_ nonblock (12) -
remove
_ by _ name (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - requirements (12)
-
response
_ handlers (12) -
runtime
_ dependencies (12) -
search
_ with _ source (12) - sendmsg (12)
-
set
_ backtrace (12) -
strongly
_ connected _ components (12) -
to
_ a (24) -
to
_ ary (12) -
to
_ csv (12) -
to
_ h (12) -
to
_ hash (12) -
to
_ json (12) -
top
_ level _ tasks (12) - union (7)
- unpack (12)
-
waiting
_ jobs (6)
検索結果
先頭5件
-
Array
# intersection(*other _ arrays) -> Array (27308.0) -
自身と引数に渡された配列の共通要素を新しい配列として返します。 要素が重複する場合は、そのうちの1つのみを返します。 要素の順序は自身の順序を維持します。
...要素が重複する場合は、そのうちの1つのみを返します。
要素の順序は自身の順序を維持します。
@param other_arrays 自身と共通要素を取りたい配列を指定します。
配列以外のオブジェクトを指定した場合は to_a......発生します。
intersectionはObject#hashとObject#eql?を使って比較を行います。
//emlist[例][ruby]{
[1, 1, 3, 5].intersection([3, 2, 1]) # => [1, 3]
["a", "b", "z"].intersection(["a", "b", "c"], ["b"]) # => ["b"]
["a"].intersection......# => ["a"]
//}
@see Set#intersection, Array#&... -
Array
# union(*other _ arrays) -> Array (27308.0) -
集合の和演算です。self と other_arrays の配列にどれかに含まれる要素を 全て含む新しい配列を返します。重複する要素は取り除かれます。
...算です。self と other_arrays の配列にどれかに含まれる要素を
全て含む新しい配列を返します。重複する要素は取り除かれます。
要素の重複判定は、Object#eql? と Object#hash により行われます。
@param other_arrays 0個以上の配列を......指定します。
//emlist[例][ruby]{
["a", "b", "c"].union([ "c", "d", "a" ]) #=> ["a", "b", "c", "d"]
["a"].union(["e", "b"], ["a", "c", "b"]) #=> ["a", "e", "b", "c"]
["a"].union # => ["a"]
//}
@see Array#|... -
Array
# concat(*other _ arrays) -> self (27210.0) -
other_arrays の要素を自身の末尾に破壊的に連結します。
..._arrays の要素を自身の末尾に破壊的に連結します。
@param other_arrays 自身と連結したい配列を指定します。
//emlist[例][ruby]{
[ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
[ "a" ].concat( ["b"], ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
[ "a" ].conc......at #=> [ "a" ]
a = [ 1, 2, 3 ]
a.concat( [ 4, 5 ] )
a #=> [ 1, 2, 3, 4, 5 ]
a = [ 1, 2 ]
a.concat(a, a) #=> [1, 2, 1, 2, 1, 2]
//}
@see Array#+... -
Array
# clone -> Array (27203.0) -
レシーバと同じ内容を持つ新しい配列を返します。
...レシーバと同じ内容を持つ新しい配列を返します。
clone は frozen singleton-class の情報も含めてコピーしますが、
dup は内容と tainted だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり......レシーバと同じ内容を持つ新しい配列を返します。
clone は frozen singleton-class の情報も含めてコピーしますが、
dup は内容だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり参照して... -
Array
# concat(other) -> self (27120.0) -
配列 other を自身の末尾に破壊的に連結します。
...other を自身の末尾に破壊的に連結します。
@param other 自身と連結したい配列を指定します。
//emlist[例][ruby]{
array = [1, 2]
a = [3, 4]
array.concat a
p array # => [1, 2, 3, 4]
p a # => [3, 4] # こちらは変わらない
//}......列 other を自身の末尾に破壊的に連結します。
@param other 自身と連結したい配列を指定します。
//emlist[例][ruby]{
array = [1, 2]
a = [3, 4]
array.concat a
p array # => [1, 2, 3, 4]
p a # => [3, 4] # こちらは変わらない
//}... -
Array
# combination(n) -> Enumerator (27113.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...4]
a.combination(1).to_a #=> [[1],[2],[3],[4]]
a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a.combination(4).to_a #=> [[1,2,3,4]]
a.combination(0).to_a #=> [[]]: one combination of length 0
a.combination(5).to_a #=>......[] : no combinations of length 5
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
result = []
a.combination(2) {|e| result << e} # => [1,2,3,4]
result #=> [[1,2],[......1,3],[1,4],[2,3],[2,4],[3,4]]
//}
@see Array#permutation, Array#repeated_combination... -
Array
# combination(n) {|c| block } -> self (27113.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...4]
a.combination(1).to_a #=> [[1],[2],[3],[4]]
a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a.combination(4).to_a #=> [[1,2,3,4]]
a.combination(0).to_a #=> [[]]: one combination of length 0
a.combination(5).to_a #=>......[] : no combinations of length 5
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
result = []
a.combination(2) {|e| result << e} # => [1,2,3,4]
result #=> [[1,2],[......1,3],[1,4],[2,3],[2,4],[3,4]]
//}
@see Array#permutation, Array#repeated_combination... -
Array
# permutation(n = self . length) -> Enumerator (27113.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...tion.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutation......f length 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e}......# => [1,2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}
@see Array#combination, Array#repeated_permutation... -
Array
# permutation(n = self . length) { |p| block } -> self (27113.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...tion.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutation......f length 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e}......# => [1,2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}
@see Array#combination, Array#repeated_permutation... -
Array
# repeated _ combination(n) -> Enumerator (27113.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...ombination(1).to_a #=> [[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
a.repeated_combination(4).to_a......epeated_combination(0).to_a #=> [[]] # one combination of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e| result <......< e} # => [1,2,3]
result #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
//}
@see Array#repeated_permutation, Array#combination...