ライブラリ
- ビルトイン (974)
- bigdecimal (12)
- cmath (120)
- fileutils (24)
-
json
/ add / complex (24) - mathn (8)
- matrix (146)
クラス
キーワード
- * (12)
- ** (12)
- + (12)
- - (12)
- -@ (24)
-
/ (35) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - < (12)
- <= (12)
- <=> (6)
- == (12)
- > (12)
- >= (12)
- Complex (36)
- I (12)
-
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) - Numeric (12)
- Rational (12)
- Ruby用語集 (12)
- abs (12)
- abs2 (12)
- acos (6)
- acosh (6)
- angle (24)
- antisymmetric? (7)
- arg (24)
- asin (6)
- asinh (6)
- atan (6)
- atan2 (6)
- atanh (6)
- between? (12)
- cbrt (6)
- clamp (12)
- coerce (12)
- conj (36)
- conjugate (36)
- copy (12)
- cos (6)
- cosh (6)
- cp (12)
- denominator (24)
- exp (6)
- fdiv (54)
- finite? (9)
- i (12)
- imag (36)
- imaginary (36)
- infinite? (18)
- inspect (12)
-
json
/ add / complex (12) -
json
_ create (12) - log (24)
- log10 (6)
- log2 (6)
- magnitude (24)
-
marshal
_ dump (12) - mathn (4)
- matrix (12)
- norm (12)
- numerator (24)
- phase (24)
- polar (36)
- quo (24)
- r (12)
- rationalize (24)
- real (36)
- real? (36)
- rect (36)
- rectangular (36)
- rsqrt (4)
- sin (6)
- sinh (6)
-
skew
_ symmetric? (7) -
slice
_ before (24) - sqrt (10)
- tan (6)
- tanh (6)
-
to
_ c (48) -
to
_ f (12) -
to
_ i (12) -
to
_ json (12) -
to
_ r (12) -
to
_ s (12) - tr (12)
- trace (12)
検索結果
先頭5件
-
Numeric
# polar -> [Numeric , Numeric] (6.0) -
自身の絶対値と偏角を配列にして返します。正の数なら [self, 0]、負の数な ら [-self, Math::PI] を返します。
...します。
//emlist[例][ruby]{
1.0.polar # => [1.0, 0]
2.0.polar # => [2.0, 0]
-1.0.polar # => [1.0, 3.141592653589793]
-2.0.polar # => [2.0, 3.141592653589793]
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Complex#polar... -
Numeric
# real -> Numeric (6.0) -
自身を返します。
...す。
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
//emlist[例][ruby]{
10.real # => 10
-10.real # => -10
0.1.real # => 0.1
Rational(2, 3).real # => (2/3)
//}
@see Numeric#imag、Complex#real... -
Numeric
# rect -> [Numeric , Numeric] (6.0) -
[self, 0] を返します。
...[self, 0] を返します。
//emlist[例][ruby]{
1.rect # => [1, 0]
-1.rect # => [-1, 0]
1.0.rect # => [1.0, 0]
-1.0.rect # => [-1.0, 0]
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Complex#rect... -
Numeric
# rectangular -> [Numeric , Numeric] (6.0) -
[self, 0] を返します。
...[self, 0] を返します。
//emlist[例][ruby]{
1.rect # => [1, 0]
-1.rect # => [-1, 0]
1.0.rect # => [1.0, 0]
-1.0.rect # => [-1.0, 0]
//}
Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。
@see Complex#rect... -
Vector
# magnitude -> Float (6.0) -
ベクトルの大きさ(ノルム)を返します。
...ベクトルの大きさ(ノルム)を返します。
//emlist[例][ruby]{
require 'matrix'
Vector[3, 4].norm # => 5.0
Vector[Complex(0, 1), 0].norm # => 1.0
//}
@see Vector#normalize... -
Vector
# norm -> Float (6.0) -
ベクトルの大きさ(ノルム)を返します。
...ベクトルの大きさ(ノルム)を返します。
//emlist[例][ruby]{
require 'matrix'
Vector[3, 4].norm # => 5.0
Vector[Complex(0, 1), 0].norm # => 1.0
//}
@see Vector#normalize... -
Vector
# r -> Float (6.0) -
ベクトルの大きさ(ノルム)を返します。
...ベクトルの大きさ(ノルム)を返します。
//emlist[例][ruby]{
require 'matrix'
Vector[3, 4].norm # => 5.0
Vector[Complex(0, 1), 0].norm # => 1.0
//}
@see Vector#normalize... -
matrix (6.0)
-
行列と数ベクトルを扱うためのライブラリです。
...行列と数ベクトルを扱うためのライブラリです。
行列、ベクトルの各要素には Ruby の任意の数オブジェクト(Numeric の
サブクラス、Float, Integer, Complex, Rational など)
が使えます。...