1014件ヒット
[1-100件を表示]
(0.129秒)
種類
- インスタンスメソッド (773)
- モジュール関数 (186)
- 特異メソッド (44)
- 定数 (11)
ライブラリ
- ビルトイン (750)
- bigdecimal (11)
- cmath (120)
- fileutils (22)
-
json
/ add / complex (22) - matrix (89)
クラス
モジュール
- BigMath (11)
- CMath (120)
- Enumerable (22)
- FileUtils (22)
- Kernel (33)
キーワード
- * (11)
- ** (11)
- + (11)
- - (11)
- -@ (11)
-
/ (11) - < (11)
- <= (11)
- <=> (5)
- == (11)
- >= (11)
- I (11)
- Rational (11)
- abs (11)
- abs2 (11)
- acos (6)
- acosh (6)
- angle (22)
- antisymmetric? (6)
- arg (22)
- asin (6)
- asinh (6)
- atan (6)
- atan2 (6)
- atanh (6)
- between? (11)
- cbrt (6)
- clamp (11)
- coerce (11)
- conj (11)
- conjugate (11)
- copy (11)
- cos (6)
- cosh (6)
- cp (11)
- denominator (11)
- exp (6)
- fdiv (39)
- finite? (8)
- i (11)
- imag (11)
- imaginary (11)
- infinite? (16)
- inspect (11)
-
json
_ create (11) - log (23)
- log10 (6)
- log2 (6)
- magnitude (22)
-
marshal
_ dump (11) - norm (11)
- numerator (11)
- phase (22)
- polar (33)
- quo (22)
- r (11)
- rationalize (22)
- real (33)
- real? (33)
- rect (22)
- rectangular (33)
- sin (6)
- sinh (6)
-
skew
_ symmetric? (6) -
slice
_ before (22) - sqrt (6)
- tan (6)
- tanh (6)
-
to
_ c (44) -
to
_ f (11) -
to
_ i (11) -
to
_ json (11) -
to
_ r (11) -
to
_ s (11) - tr (11)
- trace (11)
検索結果
先頭5件
-
Complex
# >(other) -> bool (42200.0) -
@undef
@undef -
Complex
# <=>(other) -> -1 | 0 | 1 | nil (30252.0) -
self の虚部がゼロで other が実数の場合、 self の実部の <=> メソッドで other と比較した結果を返します。 other が Complex で虚部がゼロの場合も同様です。
...self の虚部がゼロで other が実数の場合、
self の実部の <=> メソッドで other と比較した結果を返します。
other が Complex で虚部がゼロの場合も同様です。
その他の場合は nil を返します。
@param other 自身と比較する数値
//emlis......t[例][ruby]{
Complex(2, 3) <=> Complex(2, 3) #=> nil
Complex(2, 3) <=> 1 #=> nil
Complex(2) <=> 1 #=> 1
Complex(2) <=> 2 #=> 0
Complex(2) <=> 3 #=> -1
//}... -
Complex
# angle -> Float (30248.0) -
自身の偏角を[-π,π]の範囲で返します。
...す。
//emlist[例][ruby]{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}
非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。
//emlist[例][ruby]{
Complex(-1, 0).arg #=> 3.1415926......589793
Complex(-1, -0).arg #=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793
Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(-0.0, -0.0).arg #=> -3.141592... -
Complex
# >=(other) -> bool (30200.0) -
@undef
@undef -
Complex
. rectangular(r , i = 0) -> Complex (27342.0) -
実部が r、虚部が i である Complex クラスのオブジェクトを生成します。
... Complex クラスのオブジェクトを生成します。
@param r 生成する複素数の実部。
@param i 生成する複素数の虚部。省略した場合は 0 です。
//emlist[例][ruby]{
Complex.rect(1) # => (1+0i)
Complex.rect(1, 2) # => (1+2i)
Complex.rectangular(......1, 2) # => (1+2i)
//}
@see Kernel.#Complex... -
Complex
. polar(r , theta = 0) -> Complex (27335.0) -
絶対値が r、偏角が theta である Complex クラスのオブジェクトを生成します。
... Complex クラスのオブジェクトを生成します。
@param r 生成する複素数の絶対値。
@param theta 生成する複素数の偏角。単位はラジアンです。省略した場合は 0 です。
//emlist[例][ruby]{
Complex.polar(2.0) # => (2.0+0.0i)
Complex.polar......(2.0, 0) # => (2.0+0.0i)
Complex.polar(2.0, Math::PI) # => (-2.0+2.4492127076447545e-16i)
//}... -
Complex
# arg -> Float (27248.0) -
自身の偏角を[-π,π]の範囲で返します。
...す。
//emlist[例][ruby]{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}
非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。
//emlist[例][ruby]{
Complex(-1, 0).arg #=> 3.1415926......589793
Complex(-1, -0).arg #=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793
Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(-0.0, -0.0).arg #=> -3.141592... -
Complex
# phase -> Float (27248.0) -
自身の偏角を[-π,π]の範囲で返します。
...す。
//emlist[例][ruby]{
Complex.polar(3, Math::PI/2).arg # => 1.5707963267948966
//}
非正の実軸付近での挙動に注意してください。以下の例のように虚部が 0.0 と
-0.0 では値が変わります。
//emlist[例][ruby]{
Complex(-1, 0).arg #=> 3.1415926......589793
Complex(-1, -0).arg #=> 3.141592653589793
Complex(-1, -0.0).arg #=> -3.141592653589793
Complex(0, 0.0).arg #=> 0.0
Complex(0, -0.0).arg #=> -0.0
Complex(-0.0, 0).arg #=> 3.141592653589793
Complex(-0.0, -0.0).arg #=> -3.141592... -
Complex
# marshal _ dump -> Array (27228.0) -
Marshal.#load のためのメソッドです。 Complex::compatible#marshal_load で復元可能な配列を返します。
...Marshal.#load のためのメソッドです。
Complex::compatible#marshal_load で復元可能な配列を返します。
2.0 以降では Marshal.#load で 1.8 系の Complex オブジェクト
を保存した文字列も復元できます。
[注意] Complex::compatible は通常の方法で... -
Complex
# rectangular -> [Numeric , Numeric] (27218.0) -
実部と虚部を配列にして返します。
...実部と虚部を配列にして返します。
//emlist[例][ruby]{
Complex(3).rect # => [3, 0]
Complex(3.5).rect # => [3.5, 0]
Complex(3, 2).rect # => [3, 2]
//}
@see Numeric#rect...