クラス
- Matrix (15)
-
Matrix
:: EigenvalueDecomposition (10) -
Matrix
:: LUPDecomposition (10)
キーワード
- det (1)
-
det
_ e (1) - determinant (1)
-
determinant
_ e (1) - diagonal? (1)
-
each
_ with _ index (2) - eigen (1)
- eigensystem (1)
-
eigenvalue
_ matrix (1) - eigenvalues (1)
-
eigenvector
_ matrix (1) -
eigenvector
_ matrix _ inv (1) - eigenvectors (1)
-
find
_ index (3) - index (3)
- lup (1)
-
lup
_ decomposition (1) - p (1)
- pivots (1)
- singular? (1)
- solve (1)
-
to
_ a (2) -
to
_ ary (2) - u (1)
- v (1)
-
v
_ inv (1)
検索結果
先頭5件
-
Matrix
:: EigenvalueDecomposition # d -> Matrix (72613.0) -
固有値を対角成分に並べた行列を返します。
固有値を対角成分に並べた行列を返します。 -
Matrix
:: LUPDecomposition # l -> Matrix (72613.0) -
LUP分解の下半行列部分を返します。
LUP分解の下半行列部分を返します。 -
Matrix
:: EigenvalueDecomposition # eigenvalue _ matrix -> Matrix (45913.0) -
固有値を対角成分に並べた行列を返します。
固有値を対角成分に並べた行列を返します。 -
Matrix
# diagonal? -> bool (45610.0) -
行列が対角行列ならば true を返します。
...行列が対角行列ならば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します... -
Matrix
:: EigenvalueDecomposition # eigenvector _ matrix -> Matrix (45610.0) -
右固有ベクトルを横に並べた行列を返します。
右固有ベクトルを横に並べた行列を返します。 -
Matrix
:: EigenvalueDecomposition # eigenvector _ matrix _ inv -> Matrix (45610.0) -
左固有ベクトルを縦に並べた行列を返します。
...左固有ベクトルを縦に並べた行列を返します。
これは Matrix::EigenvalueDecomposition#v の逆行列です... -
Matrix
:: EigenvalueDecomposition # eigenvalues -> [Float] (45310.0) -
固有値を配列で返します。
固有値を配列で返します。 -
Matrix
:: LUPDecomposition # det -> Numeric (45310.0) -
元の行列の行列式の値を返します。 LUP 分解の結果を利用して計算します。
...元の行列の行列式の値を返します。
LUP 分解の結果を利用して計算します。
@see Matrix#determinant... -
Matrix
:: LUPDecomposition # determinant -> Numeric (45310.0) -
元の行列の行列式の値を返します。 LUP 分解の結果を利用して計算します。
...元の行列の行列式の値を返します。
LUP 分解の結果を利用して計算します。
@see Matrix#determinant... -
Matrix
# lup _ decomposition -> Matrix :: LUPDecomposition (37600.0) -
行列の LUP 分解を保持したオブジェクトを返します。
...
Matrix::LUPDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(下三角行列、上三角行列、置換行列)
を得ることができます。これを [L, U, P] と書くと、
L*U = P*self を満たします。
//emlist[例][ruby]{
require 'matrix'......a = Matrix[[1, 2], [3, 4]]
l, u, p = a.lup
l.lower_triangular? # => true
u.upper_triangular? # => true
p.permutation? # => true
l * u == p * a # => true
a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]
//}
@see Matrix::LUPDecomposition... -
Matrix
:: LUPDecomposition # solve(b) -> Vector | Matrix (36610.0) -
self が正方行列 A の LUP 分解の時、一次方程式 Ax = b の解を返します。 b には Vector, Matrix, 数値の配列を指定出来ます。
...self が正方行列 A の LUP 分解の時、一次方程式 Ax = b の解を返します。
b には Vector, Matrix, 数値の配列を指定出来ます。
それぞれベクトルのサイズ、行列の行数、配列のサイズが A の列数と一致していなければなりません。......指定します。
//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)]]
//}... -
Matrix
:: EigenvalueDecomposition # v -> Matrix (36310.0) -
右固有ベクトルを横に並べた行列を返します。
右固有ベクトルを横に並べた行列を返します。 -
Matrix
:: EigenvalueDecomposition # v _ inv -> Matrix (36310.0) -
左固有ベクトルを縦に並べた行列を返します。
...左固有ベクトルを縦に並べた行列を返します。
これは Matrix::EigenvalueDecomposition#v の逆行列です... -
Matrix
:: LUPDecomposition # singular? -> bool (36310.0) -
元の行列が正方で特異なら true を、正則なら false を返します。 LUP 分解の結果を利用して判定します。
...元の行列が正方で特異なら true を、正則なら false を返します。
LUP 分解の結果を利用して判定します。
@see Matrix#singular?... -
Matrix
# lup -> Matrix :: LUPDecomposition (28300.0) -
行列の LUP 分解を保持したオブジェクトを返します。
...
Matrix::LUPDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(下三角行列、上三角行列、置換行列)
を得ることができます。これを [L, U, P] と書くと、
L*U = P*self を満たします。
//emlist[例][ruby]{
require 'matrix'......a = Matrix[[1, 2], [3, 4]]
l, u, p = a.lup
l.lower_triangular? # => true
u.upper_triangular? # => true
p.permutation? # => true
l * u == p * a # => true
a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]
//}
@see Matrix::LUPDecomposition... -
Matrix
:: EigenvalueDecomposition # to _ a -> [Matrix , Matrix , Matrix] (27958.0) -
Matrix::EigenvalueDecomposition#v, Matrix::EigenvalueDecomposition#d, Matrix::EigenvalueDecomposition#v_inv をこの順に並べた配列を返します。
...
Matrix::EigenvalueDecomposition#v,
Matrix::EigenvalueDecomposition#d,
Matrix::EigenvalueDecomposition#v_inv
をこの順に並べた配列を返します。... -
Matrix
:: EigenvalueDecomposition # to _ ary -> [Matrix , Matrix , Matrix] (27958.0) -
Matrix::EigenvalueDecomposition#v, Matrix::EigenvalueDecomposition#d, Matrix::EigenvalueDecomposition#v_inv をこの順に並べた配列を返します。
...
Matrix::EigenvalueDecomposition#v,
Matrix::EigenvalueDecomposition#d,
Matrix::EigenvalueDecomposition#v_inv
をこの順に並べた配列を返します。... -
Matrix
:: LUPDecomposition # to _ a -> [Matrix , Matrix , Matrix] (27910.0) -
分解した行列を [下半行列, 上半行列, 置換行列] という3要素の配列で 返します。
分解した行列を [下半行列, 上半行列, 置換行列] という3要素の配列で
返します。 -
Matrix
:: LUPDecomposition # to _ ary -> [Matrix , Matrix , Matrix] (27910.0) -
分解した行列を [下半行列, 上半行列, 置換行列] という3要素の配列で 返します。
分解した行列を [下半行列, 上半行列, 置換行列] という3要素の配列で
返します。 -
Matrix
# det _ e -> Rational | Float (27610.0) -
このメソッドは deprecated です。 Matrix#determinant を代わりに使ってください。
...このメソッドは deprecated です。
Matrix#determinant を代わりに使ってください。... -
Matrix
# determinant _ e -> Rational | Float (27610.0) -
このメソッドは deprecated です。 Matrix#determinant を代わりに使ってください。
...このメソッドは deprecated です。
Matrix#determinant を代わりに使ってください。... -
Matrix
# each _ with _ index(which = :all) -> Enumerator (27610.0) -
行列の各要素をその位置とともに引数としてブロックを呼び出します。
...る要素の範囲を指定することができます。
Matrix#each と同じなのでそちらを参照してください。
ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#......{e} at #{row}, #{col}"
end
# => 1 at 0, 0
# => 2 at 0, 1
# => 3 at 1, 0
# => 4 at 1, 1
//}
@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each... -
Matrix
# each _ with _ index(which = :all) {|e , row , col| . . . } -> self (27610.0) -
行列の各要素をその位置とともに引数としてブロックを呼び出します。
...る要素の範囲を指定することができます。
Matrix#each と同じなのでそちらを参照してください。
ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
puts "#......{e} at #{row}, #{col}"
end
# => 1 at 0, 0
# => 2 at 0, 1
# => 3 at 1, 0
# => 4 at 1, 1
//}
@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each... -
Matrix
# find _ index(selector = :all) -> Enumerator (27610.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず... -
Matrix
# find _ index(selector = :all) {|e| . . . } -> [Integer , Integer] | nil (27610.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず... -
Matrix
# find _ index(value , selector = :all) -> [Integer , Integer] | nil (27610.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず... -
Matrix
# index(selector = :all) -> Enumerator (27610.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず... -
Matrix
# index(selector = :all) {|e| . . . } -> [Integer , Integer] | nil (27610.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず... -
Matrix
# index(value , selector = :all) -> [Integer , Integer] | nil (27610.0) -
指定した値と一致する要素の位置を [row, column] という配列で返します。 ブロックを与えた場合は各要素を引数としてブロックを呼び出し、 返り値が真であった要素の位置を返します。
...で行列のどの部分を探すかを指定します。この引数の意味は
Matrix#each を参照してください。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
//}
value を指定せず... -
Matrix
:: LUPDecomposition # p -> Matrix (27310.0) -
LUP分解の置換行列部分を返します。
LUP分解の置換行列部分を返します。 -
Matrix
:: LUPDecomposition # u -> Matrix (27310.0) -
LUP分解の上半行列部分を返します。
LUP分解の上半行列部分を返します。 -
Matrix
:: EigenvalueDecomposition # eigenvectors -> [Vector] (27010.0) -
右固有ベクトルを配列で返します。
右固有ベクトルを配列で返します。 -
Matrix
:: LUPDecomposition # pivots -> [Integer] (27010.0) -
ピボッティングを表す配列を返します。
ピボッティングを表す配列を返します。 -
Matrix
# eigen -> Matrix :: EigenvalueDecomposition (10036.0) -
行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。
...行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。
Matrix::EigenvalueDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(右固有ベクトル、固有値行列、左固有ベクトル)
を得ることがで......ruby]{
require 'matrix'
m = Matrix[[1, 2], [3, 4]]
v, d, v_inv = m.eigensystem
d.diagonal? # => true
v.inv == v_inv # => true
(v * d * v_inv).round(5) == m # => true
//}
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します
@see Matrix::EigenvalueDec... -
Matrix
# eigensystem -> Matrix :: EigenvalueDecomposition (10036.0) -
行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。
...行列の固有値と左右の固有ベクトルを保持したオブジェクトを返します。
Matrix::EigenvalueDecomposition は to_ary を定義しているため、
多重代入によって3つの行列(右固有ベクトル、固有値行列、左固有ベクトル)
を得ることがで......ruby]{
require 'matrix'
m = Matrix[[1, 2], [3, 4]]
v, d, v_inv = m.eigensystem
d.diagonal? # => true
v.inv == v_inv # => true
(v * d * v_inv).round(5) == m # => true
//}
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します
@see Matrix::EigenvalueDec...