611件ヒット
[1-100件を表示]
(0.124秒)
クラス
- Matrix (379)
-
Matrix
:: LUPDecomposition (12) - Vector (220)
キーワード
- * (48)
- ** (12)
- + (24)
- +@ (24)
- - (24)
- -@ (12)
-
/ (36) - []= (7)
-
angle
_ with (12) - coerce (12)
- collect! (28)
- column (24)
- combine (8)
- covector (12)
- cross (12)
-
cross
_ product (12) - each (48)
- each2 (24)
-
each
_ with _ index (24) - eigen (12)
- eigensystem (12)
-
first
_ minor (12) - hstack (12)
- independent? (12)
- lup (12)
-
lup
_ decomposition (12) - map! (28)
- minor (24)
- row (24)
- solve (12)
- transpose (12)
- vstack (12)
検索結果
先頭5件
-
Matrix
# t -> Matrix (21210.0) -
転置行列 (transpose matrix) を返します。
...転置行列 (transpose matrix) を返します。
self を Matrix のオブジェクトで、(m,n) 型行列としたとき a(j,i) を (i,j) 要素とする (n,m) 型行列を返します。... -
Vector
# cross _ product(*vs) -> Vector (15337.0) -
self とベクトル vs とのクロス積を返します。
...
self とベクトル vs とのクロス積を返します。
self が3次元ベクトル空間のときは
普通のクロス積です。
それ以外の場合は拡張されたクロス積で
n-1個のn次元ベクトルが張る空間と
直交するベクトルを返します。
self の次元......元ベクトルでなければなりません。
@param vs クロス積を取るベクトルの集合
@raise ExceptionForMatrix::ErrOperationNotDefined self の
次元が1以下であるときに発生します。
@raise ArgumentError vs のベクトルの個数が n-2 以外である場合... -
Vector
# covector -> Matrix (15209.0) -
Matrix オブジェクトへ変換します。
...Matrix オブジェクトへ変換します。
列ベクトル (行列)、すなわち、(n, 1) 型の行列に変換します。
実際には Matrix.row_vector(self) を適用します。
//emlist[例][ruby]{
require 'matrix'
v = Vector[2, 3, 5]
p v # => Vector[2, 3, 5]
m = v.covector
p m # => M......atrix[[2, 3, 5]]
//}... -
Matrix
# transpose -> Matrix (12310.0) -
転置行列 (transpose matrix) を返します。
...転置行列 (transpose matrix) を返します。
self を Matrix のオブジェクトで、(m,n) 型行列としたとき a(j,i) を (i,j) 要素とする (n,m) 型行列を返します。... -
Matrix
# first _ minor(row , column) -> Matrix (12219.0) -
self から第 row 行と第 column 列を取り除いた行列を返します。
...
self から第 row 行と第 column 列を取り除いた行列を返します。
@param row 行
@param column 列
@raise ArgumentError row, column が行列の行数/列数を越えている場合に発生します。... -
Matrix
# hstack(*matrices) -> Matrix (9331.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
# minor(from _ row . . to _ row , from _ col . . to _ col) -> Matrix (9319.0) -
selfの部分行列を返します。
...
selfの部分行列を返します。
自分自身の部分行列を返します。
ただし、パラメータは次の方法で指定します。
(1) 開始行番号, 行の大きさ, 開始列番号, 列の大きさ
(2) 開始行番号..終了行番号, 開始列番号..終了列番号
@pa......ram from_row 部分行列の開始行(0オリジンで指定)
@param row_size 部分行列の行サイズ
@param from_col 部分行列の開始列(0オリジンで指定)
@param col_size 部分行列の列サイズ
//emlist[例][ruby]{
require 'matrix'
a1 = [ 1, 2, 3, 4, 5]
a2 = [11, 12, 13, 14......, 15]
a3 = [21, 22, 23, 24, 25]
a4 = [31, 32, 33, 34, 35]
a5 = [51, 52, 53, 54, 55]
m = Matrix[a1, a2, a3, a4, a5]
p m.minor(0, 2, 1, 2) # => Matrix[[2, 3], [12, 13]]
//}... -
Matrix
# lup _ decomposition -> Matrix :: LUPDecomposition (9309.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
# each _ with _ index(which = :all) {|e , row , col| . . . } -> self (9304.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...