11件ヒット
[1-11件を表示]
(0.087秒)
別のキーワード
ライブラリ
- matrix (11)
キーワード
- ** (1)
- each (2)
- eigen (1)
- eigensystem (1)
- hstack (1)
- lup (1)
-
lup
_ decomposition (1) - vstack (1)
検索結果
先頭5件
-
Matrix
# *(m) -> Matrix | Vector (105613.0) -
self に行列またはベクトル m を右から乗じた行列を返します。
...を返します。
m が Vector オブジェクトなら返り値も Vector オブジェクトになります。
@param m 右からの乗算が定義可能な行列やベクトルを指定します。
@raise ExceptionForMatrix::ErrDimensionMismatch 次元が合わない場合に発生します... -
Matrix
# *(other) -> Matrix (105613.0) -
self の各成分に数 other を掛けた行列を返します。
self の各成分に数 other を掛けた行列を返します。
@param other self の各成分に掛ける Numeric オブジェクトを指定します。 -
Matrix
# **(n) -> Matrix (69610.0) -
self の n 乗を返します。
...self の n 乗を返します。
@param n べき数の指定
@raise ExceptionForMatrix::ErrNotRegular n が 0 以下で、行列が正則でない場合に発生します... -
Matrix
# hstack(*matrices) -> Matrix (51754.0) -
行列 self と matrices を横に並べた行列を生成します。
...self と matrices を横に並べた行列を生成します。
Matrix.hstack(self, *matrices) と同じです。
//emlist[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
x.hstack(y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
//}
@param matrices 並べる行列。......すべての行列の行数がselfの行数と一致していなければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行数の異なる行列がある場合に発生します
@see Matrix.hstack, Matrix#vstack... -
Matrix
# eigen -> Matrix :: EigenvalueDecomposition (51457.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 (51457.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
# lup -> Matrix :: LUPDecomposition (51457.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
# lup _ decomposition -> Matrix :: LUPDecomposition (51457.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
# vstack -> Matrix (51454.0) -
行列 self と matrices を縦に並べた行列を生成します。
...と matrices を縦に並べた行列を生成します。
Matrix.vstack(self, *matrices) と同じです。
//emlist[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
x.vstack(y) # => Matrix[[1, 2], [3, 4], [5, 6], [7, 8]]
//}
@see Matrix.vstack, Matrix#hstack... -
Matrix
# each(which = :all) -> Enumerator (51223.0) -
行列の各要素を引数としてブロックを呼び出します。
...uby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
//}
@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each_with_index, Matrix#map... -
Matrix
# each(which = :all) {|e| . . . } -> self (51223.0) -
行列の各要素を引数としてブロックを呼び出します。
...uby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
//}
@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each_with_index, Matrix#map...