1017件ヒット
[1-100件を表示]
(0.090秒)
ライブラリ
- ビルトイン (744)
- bigdecimal (11)
- cmath (12)
- fileutils (22)
-
json
/ add / complex (22) - mathn (8)
- matrix (133)
クラス
キーワード
- * (11)
- ** (11)
- + (11)
- - (11)
- -@ (11)
-
/ (21) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - < (11)
- <= (11)
- <=> (5)
- == (11)
- > (11)
- >= (11)
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) - Numeric (11)
- Rational (11)
- Ruby用語集 (11)
- abs (11)
- abs2 (11)
- angle (11)
- antisymmetric? (6)
- arg (22)
- cbrt (6)
- clamp (11)
- coerce (11)
- conj (22)
- conjugate (22)
- copy (11)
- cp (11)
- denominator (22)
- fdiv (50)
- i (11)
- imag (33)
- imaginary (33)
- infinite? (8)
- inspect (11)
-
json
_ create (11) - log (11)
- magnitude (22)
-
marshal
_ dump (11) - matrix (11)
- norm (11)
- numerator (22)
- phase (11)
- polar (33)
- quo (22)
- rationalize (22)
- real (33)
- real? (33)
- rect (33)
- rectangular (33)
- rsqrt (4)
-
skew
_ symmetric? (6) -
slice
_ before (22) - sqrt (10)
-
to
_ c (22) -
to
_ i (11) -
to
_ json (11) -
to
_ r (11) -
to
_ s (11) - tr (11)
- trace (11)
検索結果
先頭5件
-
Complex
# coerce(other) -> [Complex , Complex] (27324.0) -
other を Complex に変換して [変換後の other, self] の配列を返します。
...other を Complex に変換して [変換後の other, self] の配列を返します。
@raise TypeError 変換できないオブジェクトを指定した場合に発生します。
//emlist[例][ruby]{
Complex(1).coerce(2) # => [(2+0i), (1+0i)]
//}... -
Complex
. rect(r , i = 0) -> Complex (27266.0) -
実部が r、虚部が i である Complex クラスのオブジェクトを生成します。
...実部が r、虚部が i である 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
. rectangular(r , i = 0) -> Complex (27266.0) -
実部が r、虚部が i である Complex クラスのオブジェクトを生成します。
...実部が r、虚部が i である 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 (27258.0) -
絶対値が r、偏角が theta である Complex クラスのオブジェクトを生成します。
...値が r、偏角が theta である 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
# rationalize -> Rational (27225.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
@param eps 許容する誤差。常に無視されます。
@raise RangeError 虚部が実数か、0 ではない場合に発生します。
//emlist[例][ruby]{
Complex(3).to_r # => (3/1)
Complex(3, 2).to_r # => RangeError
//}... -
Complex
# rationalize(eps) -> Rational (27225.0) -
自身を Rational に変換します。
...自身を Rational に変換します。
@param eps 許容する誤差。常に無視されます。
@raise RangeError 虚部が実数か、0 ではない場合に発生します。
//emlist[例][ruby]{
Complex(3).to_r # => (3/1)
Complex(3, 2).to_r # => RangeError
//}... -
Complex
. json _ create(hash) -> Complex (27223.0) -
JSON のオブジェクトから Complex のオブジェクトを生成して返します。
...JSON のオブジェクトから Complex のオブジェクトを生成して返します。
@param hash 実部をキー 'r'、虚部をキー 'i' に持つハッシュを指定します。... -
Complex
# numerator -> Complex (27219.0) -
分子を返します。
...分子を返します。
//emlist[例][ruby]{
Complex('1/2+2/3i').numerator # => (3+4i)
Complex(3).numerator # => (3+0i)
//}
@see Complex#denominator... -
Complex
# denominator -> Integer (27218.0) -
分母を返します。
...と虚部の分母の最小公倍数を整数で返します。
1 2 3+4i <- numerator(分子)
- + -i -> ----
2 3 6 <- denominator(分母)
//emlist[例][ruby]{
Complex('1/2+2/3i').denominator # => 6
Complex(3).numerator # => 1
//}
@see Complex#numerator... -
Complex
# marshal _ dump -> Array (27128.0) -
Marshal.#load のためのメソッドです。 Complex::compatible#marshal_load で復元可能な配列を返します。
...Marshal.#load のためのメソッドです。
Complex::compatible#marshal_load で復元可能な配列を返します。
2.0 以降では Marshal.#load で 1.8 系の Complex オブジェクト
を保存した文字列も復元できます。
[注意] Complex::compatible は通常の方法で...