るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.014秒)
トップページ > クエリ:require[x] > バージョン:3.2[x] > ライブラリ:bigdecimal/ludcmp[x]

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

モジュール

検索結果

LUSolve.#lusolve(a, b, ps, zero = 0.0) -> [BigDecimal] (61.0)

LU 分解を用いて、連立1次方程式 Ax = b の解 x を求めて返します。

...定します。

@param zero 0.0 を表す値を指定します。

//emlist[][ruby]{
require 'bigdecimal'
require 'bigdecimal/util'
require 'bigdecimal/ludcmp'

include LUSolve

a = [['1.0', '2.0'], ['3.0', '1.0']].flatten.map(&:to_d)
# x = ['1.0', -1.0']
b = ['-1.0', '2.0'].map(&:to_d)

zero = '0....