別のキーワード
ライブラリ
- ビルトイン (1131)
- abbrev (12)
- csv (36)
- date (4)
- delegate (12)
- expect (24)
- json (60)
- matrix (48)
- observer (12)
- openssl (36)
- optparse (36)
- pathname (12)
- rake (36)
-
rexml
/ document (12) -
rubygems
/ commands / update _ command (12) -
rubygems
/ commands / which _ command (24) -
rubygems
/ dependency _ installer (12) -
rubygems
/ dependency _ list (12) -
rubygems
/ format (12) -
rubygems
/ old _ format (12) -
rubygems
/ platform (12) -
rubygems
/ requirement (12) -
rubygems
/ security (12) -
rubygems
/ source _ index (24) -
rubygems
/ source _ info _ cache (12) -
rubygems
/ spec _ fetcher (24) -
rubygems
/ specification (96) - scanf (36)
- set (18)
- shell (18)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (36)
-
webrick
/ httpserver (12) -
webrick
/ httputils (24)
クラス
- Array (577)
-
CSV
:: Row (24) -
CSV
:: Table (12) - Data (3)
- Date (2)
- DateTime (2)
-
Encoding
:: Converter (12) - Enumerator (24)
-
Gem
:: Commands :: UpdateCommand (12) -
Gem
:: Commands :: WhichCommand (24) -
Gem
:: DependencyInstaller (12) -
Gem
:: DependencyList (12) -
Gem
:: Format (12) -
Gem
:: OldFormat (12) -
Gem
:: Platform (12) -
Gem
:: Requirement (12) -
Gem
:: Security :: Policy (12) -
Gem
:: SourceIndex (24) -
Gem
:: SourceInfoCache (12) -
Gem
:: SpecFetcher (24) -
Gem
:: Specification (96) - Hash (24)
- IO (36)
- IPSocket (12)
-
JSON
:: State (48) - MatchData (62)
- Matrix (24)
- Module (72)
- Object (48)
-
OpenSSL
:: X509 :: ExtensionFactory (36) - OptionParser (36)
- Pathname (12)
-
REXML
:: Element (12) -
Rake
:: Application (12) - Random (36)
- Range (12)
- Rational (24)
- Set (24)
- Shell (18)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) -
Socket
:: Option (12) - String (45)
- UDPSocket (12)
- Vector (24)
-
WEBrick
:: HTTPServer :: MountTable (12) -
WEBrick
:: HTTPUtils :: FormData (24)
モジュール
- Enumerable (222)
- FileUtils (12)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) - Kernel (24)
- Observable (12)
キーワード
- DelegateClass (12)
- [] (84)
- abbrev (12)
-
add
_ attributes (12) -
add
_ bindir (12) -
add
_ observer (12) - addr (12)
- all? (15)
- any? (16)
-
array
_ nl (12) -
array
_ nl= (12) - bsearch (24)
-
bsearch
_ index (10) -
cert
_ chain (12) - coerce (24)
- collect (24)
- collect! (12)
- collect2 (12)
-
collect
_ concat (24) - combination (24)
- concat (33)
- convpath (12)
-
create
_ ext _ from _ array (12) -
create
_ extension (24) - cycle (12)
-
deconstruct
_ keys (9) -
delete
_ at (12) -
delete
_ if (12) - dependencies (12)
-
dependent
_ gems (12) -
development
_ dependencies (12) -
drop
_ while (24) - each (12)
- each2 (12)
-
each
_ index (12) -
enum
_ for (24) - expect (24)
- fetch (12)
-
fetch
_ values (2) - fields (12)
-
file
_ entries (24) - filter (7)
- filter! (7)
-
find
_ index (12) -
find
_ matching (12) -
find
_ paths (12) -
flat
_ map (24) - flatten (36)
- flatten! (24)
-
gather
_ dependencies (12) -
gem
_ paths (12) - grep (24)
- index (12)
-
keep
_ if (12) -
latest
_ specs (12) - list (12)
- map (24)
- map! (12)
-
marshal
_ dump (12) -
max
_ by (24) -
min
_ by (24) - mkdir (18)
-
next
_ values (12) - none? (14)
- on (36)
- one? (14)
- outdated (12)
- pack (21)
-
pathmap
_ explode (12) -
peek
_ values (12) - permutation (24)
- private (48)
-
private
_ class _ method (24) - rand (36)
-
recvfrom
_ nonblock (12) - reject (24)
- reject! (12)
-
remove
_ by _ name (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - requirements (12)
-
reverse
_ each (12) - rindex (12)
- rotate (12)
- rotate! (12)
-
runtime
_ dependencies (12) - scan (12)
- scanf (36)
-
search
_ with _ source (12) - select (12)
- select! (12)
-
sort
_ by (12) -
sort
_ by! (12) - split (12)
-
split
_ all (12) -
system
_ path (6) -
system
_ path= (6) -
take
_ while (24) -
to
_ a (24) -
to
_ ary (12) -
to
_ enum (24) -
to
_ h (12) -
to
_ hash (12) -
to
_ json (12) -
top
_ level _ tasks (12) - unpack (24)
- unpack1 (9)
-
values
_ at (60) -
verify
_ gem (12) -
which
_ to _ update (12)
検索結果
先頭5件
-
Vector
# each2(v) -> Enumerator (107.0) -
ベクトルの各要素と、それに対応するインデックスを持つ引数 v の要素との組に対して (2引数の) ブロックを繰返し評価します。
...クを省略した場合は Enumerator を返します。
@param v 各要素と組を取るためのオブジェクト
@raise ExceptionForMatrix::ErrDimensionMismatch 自分自身と引数のベクト
ルの要素の数(次元)が異なっていたときに発生します。
@see Array#zip... -
Enumerable
# drop _ while -> Enumerator (102.0) -
ブロックを評価して最初に偽となった要素の手前の要素まで捨て、 残りの要素を配列として返します。
...価して最初に偽となった要素の手前の要素まで捨て、
残りの要素を配列として返します。
ブロックを指定しなかった場合は、Enumerator を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4, 5, 0]
a.drop_while {|i| i < 3 } # => [3, 4, 5, 0]
//}... -
Enumerable
# max _ by -> Enumerator (102.0) -
各要素を順番にブロックに渡して実行し、 その評価結果を <=> で比較して、 最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。
...は Enumerator を返します。
@param n 取得する要素数。
//emlist[例][ruby]{
a = %w(albatross dog horse)
a.max_by # => #<Enumerator: ["albatross", "dog", "horse"]:max_by>
a.max_by { |x| x.length } # => "albatross"
//}
//emlist[例][ruby]{
a = %w[albatross dog hors......e]
a.max_by(2) # => #<Enumerator: ["albatross", "dog", "horse"]:max_by(2)>
a.max_by(2) {|x| x.length } # => ["albatross", "horse"]
//}
//emlist[例: enum.max_by(n)は、重み付きランダムサンプリングを実装するために使用できます。次の実装例は、En......Weighted random sampling with a reservoir
# Information Processing Letters
# Volume 97, Issue 5 (16 March 2006)
def wsample(n)
self.max_by(n) {|v| rand ** (1.0/yield(v)) }
end
end
e = (-20..20).to_a*10000
a = e.wsample(20000) {|x|
Math.exp(-(x/5.0)**2) # normal distribution
}
# a is 20... -
Enumerable
# max _ by(n) -> Enumerator (102.0) -
各要素を順番にブロックに渡して実行し、 その評価結果を <=> で比較して、 最大であった値に対応する元の要素、もしくは最大の n 要素が降順で入った配列を返します。
...は Enumerator を返します。
@param n 取得する要素数。
//emlist[例][ruby]{
a = %w(albatross dog horse)
a.max_by # => #<Enumerator: ["albatross", "dog", "horse"]:max_by>
a.max_by { |x| x.length } # => "albatross"
//}
//emlist[例][ruby]{
a = %w[albatross dog hors......e]
a.max_by(2) # => #<Enumerator: ["albatross", "dog", "horse"]:max_by(2)>
a.max_by(2) {|x| x.length } # => ["albatross", "horse"]
//}
//emlist[例: enum.max_by(n)は、重み付きランダムサンプリングを実装するために使用できます。次の実装例は、En......Weighted random sampling with a reservoir
# Information Processing Letters
# Volume 97, Issue 5 (16 March 2006)
def wsample(n)
self.max_by(n) {|v| rand ** (1.0/yield(v)) }
end
end
e = (-20..20).to_a*10000
a = e.wsample(20000) {|x|
Math.exp(-(x/5.0)**2) # normal distribution
}
# a is 20... -
Enumerable
# min _ by -> Enumerator (102.0) -
各要素を順番にブロックに渡して評価し、 その評価結果を <=> で比較して、 最小であった値に対応する元の要素、もしくは最小の n 要素が昇順で入った配列を返します。
...Enumerator を返します。
Enumerable#min と Enumerable#min_by の
違いは Enumerable#sort と Enumerable#sort_by の違いと同じです。
@param n 取得する要素数。
//emlist[例][ruby]{
a = %w(albatross dog horse)
a.min_by # => #<Enumerator: ["albatross", "dog......", "horse"]:min_by>
a.min_by { |x| x.length } # => "dog"
a.min_by(2) # => #<Enumerator: ["albatross", "dog", "horse"]:min_by(2)>
a.min_by(2) {|x| x.length } # => ["dog", "horse"]
//}
@see Enumerable#sort_by... -
Enumerable
# min _ by(n) -> Enumerator (102.0) -
各要素を順番にブロックに渡して評価し、 その評価結果を <=> で比較して、 最小であった値に対応する元の要素、もしくは最小の n 要素が昇順で入った配列を返します。
...Enumerator を返します。
Enumerable#min と Enumerable#min_by の
違いは Enumerable#sort と Enumerable#sort_by の違いと同じです。
@param n 取得する要素数。
//emlist[例][ruby]{
a = %w(albatross dog horse)
a.min_by # => #<Enumerator: ["albatross", "dog......", "horse"]:min_by>
a.min_by { |x| x.length } # => "dog"
a.min_by(2) # => #<Enumerator: ["albatross", "dog", "horse"]:min_by(2)>
a.min_by(2) {|x| x.length } # => ["dog", "horse"]
//}
@see Enumerable#sort_by... -
OptionParser
# on(long , pat = / . * / , desc = "") {|v| . . . } -> self (102.0) -
オプションを取り扱うためのブロックを自身に登録します。 ブロックはコマンドラインのパース時に、オプションが指定されていれば呼ばれます。
...自身に登録します。
ブロックはコマンドラインのパース時に、オプションが指定されていれば呼ばれます。
pat にはオプションの引数に許すパターンを表す正規表現で与えます。
コマンドに与えられた引数がパターンにマ......ートオプションを表す文字列を指定します。
@param long ロングオプションを表す文字列を指定します。
@param pat オプションの引数に許すパターンを表す正規表現で指定します。
@param desc オプションの説明を文字列で与えま... -
OptionParser
# on(short , long , pat = / . * / , desc = "") {|v| . . . } -> self (102.0) -
オプションを取り扱うためのブロックを自身に登録します。 ブロックはコマンドラインのパース時に、オプションが指定されていれば呼ばれます。
...自身に登録します。
ブロックはコマンドラインのパース時に、オプションが指定されていれば呼ばれます。
pat にはオプションの引数に許すパターンを表す正規表現で与えます。
コマンドに与えられた引数がパターンにマ......ートオプションを表す文字列を指定します。
@param long ロングオプションを表す文字列を指定します。
@param pat オプションの引数に許すパターンを表す正規表現で指定します。
@param desc オプションの説明を文字列で与えま... -
OptionParser
# on(short , pat = / . * / , desc = "") {|v| . . . } -> self (102.0) -
オプションを取り扱うためのブロックを自身に登録します。 ブロックはコマンドラインのパース時に、オプションが指定されていれば呼ばれます。
...自身に登録します。
ブロックはコマンドラインのパース時に、オプションが指定されていれば呼ばれます。
pat にはオプションの引数に許すパターンを表す正規表現で与えます。
コマンドに与えられた引数がパターンにマ......ートオプションを表す文字列を指定します。
@param long ロングオプションを表す文字列を指定します。
@param pat オプションの引数に許すパターンを表す正規表現で指定します。
@param desc オプションの説明を文字列で与えま...