1521件ヒット
[1-100件を表示]
(0.041秒)
別のキーワード
ライブラリ
- ビルトイン (1003)
- date (28)
-
fiddle
/ import (36) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / rational (12) - matrix (214)
- mkmf (12)
- optparse (48)
- pathname (72)
- rake (24)
-
rubygems
/ specification (36) - stringio (12)
クラス
- Array (104)
- Data (9)
- Date (38)
- DateTime (14)
-
Encoding
:: Converter (48) - Enumerator (72)
-
Enumerator
:: Lazy (120) -
Enumerator
:: Yielder (12) - File (12)
- Float (54)
-
Gem
:: Specification (36) - Hash (44)
- Integer (16)
- MatchData (12)
- Matrix (152)
- Module (108)
- Object (72)
- OptionParser (48)
- Pathname (72)
- Proc (6)
- Range (16)
- Rational (36)
- Regexp (24)
- String (45)
- StringIO (12)
- Struct (12)
- Time (12)
- Vector (62)
モジュール
- Enumerable (181)
-
Fiddle
:: Importer (36) - FileUtils (12)
- Kernel (12)
-
Rake
:: TaskManager (12)
キーワード
- % (2)
- ** (24)
- accept (12)
-
add
_ dependency (12) -
add
_ development _ dependency (12) -
add
_ runtime _ dependency (12) - attr (12)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - bind (12)
- binread (12)
- bsearch (24)
- chain (7)
- chunk (12)
- collect (50)
- collect! (33)
- collect2 (12)
-
collect
_ concat (36) - concat (18)
-
create
_ makefile (12) -
create
_ rule (12) -
deconstruct
_ keys (4) -
deprecate
_ constant (12) - divmod (12)
- each (72)
-
each
_ line (24) -
each
_ with _ index (12) -
each
_ with _ object (12) - eigen (12)
- eigensystem (12)
-
enum
_ for (48) -
fetch
_ values (2) -
filter
_ map (12) -
flat
_ map (36) - flock (12)
- fnmatch (12)
- force (12)
-
grep
_ v (24) - hstack (12)
- join (12)
- lazy (12)
- lup (12)
-
lup
_ decomposition (12) - map (50)
- map! (33)
- match (24)
-
max
_ by (24) -
next
_ year (12) - on (36)
- pack (21)
-
prev
_ year (12) -
primitive
_ convert (48) - printf (12)
- private (12)
-
private
_ class _ method (12) -
private
_ constant (12) -
respond
_ to _ missing? (12) - round (22)
- ruby (12)
-
ruby2
_ keywords (18) - step (2)
- strftime (12)
- struct (12)
-
to
_ enum (48) -
to
_ f (24) -
to
_ h (6) -
to
_ json (36) -
to
_ r (12) -
to
_ regexp (12) -
transform
_ values (9) -
transform
_ values! (9) - union (12)
- unpack (12)
- update (14)
-
values
_ at (48) - vstack (12)
- with (3)
-
with
_ index (18) -
with
_ object (12) - yield (12)
- zip (24)
検索結果
先頭5件
-
Rational
# *(other) -> Rational | Float (21331.0) -
積を計算します。
...。
@param other 自身に掛ける数
other に Float を指定した場合は、計算結果を Float で返しま
す。
//emlist[例][ruby]{
r = Rational(3, 4)
r * 2 # => (3/2)
r * 4 # => (3/1)
r * 0.5 # => 0.375
r * Rational(1, 2) # => (3/8)
//}... -
Float
# *(other) -> Float (21213.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
//emlist[例][ruby]{
# 積
2.4 * 3 # => 7.2
//}... -
Vector
# *(m) -> Matrix (18214.0) -
自分自身を列ベクトル(行列)に変換して (実際には Matrix.column_vector(self) を適用) から、行列 m を右から乗じた行列 (Matrix クラス) を返します。
...トル(行列)に変換して (実際には Matrix.column_vector(self) を適用) から、行列 m を右から乗じた行列 (Matrix クラス) を返します。
@param m 右から乗算を行う行列
@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発生します......=== 注意
引数の行列 m は自分自身を列ベクトルとした場合に乗算が定義できる行列である必要があります。
//emlist[例][ruby]{
require 'matrix'
v = Vector[1, 2]
a = [4, 5, 6]
m = Matrix[a]
p v * m # => Matrix[[4, 5, 6], [8, 10, 12]]
//}... -
MatchData
# values _ at(*index) -> [String] (12238.0) -
正規表現中の n 番目の括弧にマッチした部分文字列の配列を返します。
...mlist[例][ruby]{
m = /(foo)(bar)(baz)/.match("foobarbaz")
# same as m.to_a.values_at(...)
p m.values_at(0, 1, 2, 3, 4) # => ["foobarbaz", "foo", "bar", "baz", nil]
p m.values_at(-1, -2, -3, -4, -5) # => ["baz", "bar", "foo", nil, nil]
m = /(?<a>\d+) *(?<op>[+\-*\/]) *(?<b>\d+)/.match("1 + 2")......m.to_a # => ["1 + 2", "1", "+", "2"]
m.values_at(:a, :b, :op) # => ["1", "2", "+"]
//}
@see Array#values_at, Array#[]... -
Pathname
# fnmatch(pattern , *args) -> bool (9324.0) -
File.fnmatch(pattern, self.to_s, *args) と同じです。
...le.fnmatch(pattern, self.to_s, *args) と同じです。
@param pattern パターンを文字列で指定します。ワイルドカードとして `*', `?', `[]' が使用できま
す。Dir.glob とは違って `{}' や `**/' は使用できません。
@param args File.fnmatch......を参照してください。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
path.fnmatch("test*") # => true
path.fnmatch("TEST*") # => false
path.fnmatch("TEST*", File::FNM_CASEFOLD) # => true
//}
@see File.fnmatch... -
Rational
# **(other) -> Rational | Float (9307.0) -
冪(べき)乗を計算します。
...に Float を指定した場合は、計算結果を Float で返しま
す。other が有理数であっても、計算結果が無理数だった場合は Float
を返します。
//emlist[例][ruby]{
r = Rational(3, 4)
r ** Rational(2, 1) # => (9/16)
r ** 2 # => (9/16)
r ** 2.0......# => 0.5625
r ** Rational(1, 2) # => 0.866025403784439
//}... -
Enumerator
:: Lazy # collect _ concat {|item| . . . } -> Enumerator :: Lazy (9225.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
...ような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x は、以下の場合にのみ分解され、連結されます。
* x が配列で......、to_ary メソッドを持つとき
* x が each および force メソッドを持つ (例:Enumerator::Lazy) とき
それ以外のときは、x は分解されず、そのままの値として使われます。
//emlist[][ruby]{
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force
#=> [{:a=>1}, {:b=>......2}]
//}
@raise ArgumentError ブロックを指定しなかった場合に発生します。
@see Enumerable#flat_map... -
Enumerator
:: Lazy # flat _ map {|item| . . . } -> Enumerator :: Lazy (9225.0) -
ブロックの実行結果をひとつに繋げたものに対してイテレートするような Enumerator::Lazy のインスタンスを返します。
...ような
Enumerator::Lazy のインスタンスを返します。
//emlist[][ruby]{
["foo", "bar"].lazy.flat_map {|i| i.each_char.lazy}.force
#=> ["f", "o", "o", "b", "a", "r"]
//}
ブロックの返した値 x は、以下の場合にのみ分解され、連結されます。
* x が配列で......、to_ary メソッドを持つとき
* x が each および force メソッドを持つ (例:Enumerator::Lazy) とき
それ以外のときは、x は分解されず、そのままの値として使われます。
//emlist[][ruby]{
[{a:1}, {b:2}].lazy.flat_map {|i| i}.force
#=> [{:a=>1}, {:b=>......2}]
//}
@raise ArgumentError ブロックを指定しなかった場合に発生します。
@see Enumerable#flat_map... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (9223.0) -
Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
@param default_dir self が相対パスであれば default_dir を基準に展開されます。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_......path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}
@see File.expand_path...