11件ヒット
[1-11件を表示]
(0.060秒)
ライブラリ
- matrix (11)
検索結果
-
Matrix
:: LUPDecomposition # solve(b) -> Vector | Matrix (114.0) -
self が正方行列 A の LUP 分解の時、一次方程式 Ax = b の解を返します。 b には Vector, Matrix, 数値の配列を指定出来ます。
...指定します。
//emlist[][ruby]{
require 'matrix'
lup = Matrix[[2, 1], [1, 2]].lup
lup.solve([1, -1]) #=> Vector[(1/1), (-1/1)]
lup.solve(Vector[3, 0]) #=> Vector[(2/1), (-1/1)]
lup.solve(Matrix[[1, 3], [-1, 0]]) #=> Matrix[[(1/1), (2/1)], [(-1/1), (-1/1)]]
//}...