るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.014秒)
トップページ > クエリ:float[x] > バージョン:2.4.0[x] > クエリ:BigDecimal[x] > クラス:Matrix[x]

別のキーワード

  1. _builtin float
  2. float rationalize
  3. float to_d
  4. fiddle align_float
  5. json float

ライブラリ

キーワード

検索結果

Matrix#det -> Numeric (40.0)

行列式 (determinant) の値を返します。

...オブジェクトを使用することを検討してください。

@raise ExceptionForMatrix::ErrDimensionMismatch 正方行列でない場合に発生します

//emlist[例][ruby]{
require 'matrix'

p Matrix[[2, 1], [-1, 2]].det #=> 5
p Matrix[[2.0, 1.0], [-1.0, 2.0]].det #=> 5.0
//}...

Matrix#determinant -> Numeric (40.0)

行列式 (determinant) の値を返します。

...オブジェクトを使用することを検討してください。

@raise ExceptionForMatrix::ErrDimensionMismatch 正方行列でない場合に発生します

//emlist[例][ruby]{
require 'matrix'

p Matrix[[2, 1], [-1, 2]].det #=> 5
p Matrix[[2.0, 1.0], [-1.0, 2.0]].det #=> 5.0
//}...

Matrix#rank -> Integer (40.0)

階数 (rank) を返します。

...め、誤った結果が生じる可能性があることに注意してください。
代わりに、Rational や BigDecimal などの正確なオブジェクトを使用することを検討してください。

//emlist[][ruby]{
require 'matrix'
m = Matrix[[2, 6], [1, 3]]
m.rank # => 1
//}...