種類
- インスタンスメソッド (575)
- 特異メソッド (72)
- クラス (48)
- 文書 (42)
ライブラリ
- matrix (695)
クラス
- Matrix (292)
-
Matrix
:: EigenvalueDecomposition (120) -
Matrix
:: LUPDecomposition (120) - Vector (115)
キーワード
- EigenvalueDecomposition (12)
- ErrDimensionMismatch (12)
- ErrOperationNotDefined (12)
- LUPDecomposition (12)
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 3
. 1 . 0 (4) - Ruby用語集 (12)
- []= (7)
- adjugate (12)
- basis (12)
- build (24)
-
cross
_ product (12) - det (24)
-
det
_ e (12) - determinant (24)
-
determinant
_ e (12) - diagonal (12)
- diagonal? (12)
- dot (12)
-
each
_ with _ index (24) - eigen (12)
- eigensystem (12)
-
eigenvalue
_ matrix (12) - eigenvalues (12)
-
eigenvector
_ matrix (12) -
eigenvector
_ matrix _ inv (12) - eigenvectors (12)
-
entrywise
_ product (8) -
find
_ index (36) -
hadamard
_ product (8) - identity (12)
- independent? (24)
- index (36)
-
inner
_ product (12) - l (12)
- lup (12)
-
lup
_ decomposition (12) - magnitude (12)
- norm (12)
- p (12)
- pivots (12)
- r (12)
- round (12)
- singular? (12)
- solve (12)
-
to
_ a (24) -
to
_ ary (24) - u (12)
- v (12)
-
v
_ inv (12)
検索結果
先頭5件
- Matrix
# each _ with _ index(which = :all) {|e , row , col| . . . } -> self - Matrix
# find _ index(selector = :all) -> Enumerator - Matrix
# find _ index(selector = :all) {|e| . . . } -> [Integer , Integer] | nil - Matrix
# find _ index(value , selector = :all) -> [Integer , Integer] | nil - Matrix
# index(selector = :all) -> Enumerator
-
Matrix
# each _ with _ index(which = :all) {|e , row , col| . . . } -> self (23124.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 (23124.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 (23124.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 (23124.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 (23124.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 (23124.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 (23124.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
# det -> Numeric (23118.0) -
行列式 (determinant) の値を返します。
...行列式 (determinant) の値を返します。
Float を使用すると、精度が不足するため、誤った結果が生じる可能性があることに注意してください。
代わりに、Rational や BigDecimal などの正確なオブジェクトを使用することを検討し......てください。
@raise ExceptionForMatrix::ErrDimensionMismatch 正方行列でない場合に発生します
//emlist[例][ruby]{
require 'matrix'
p Matrix[[2, 1], [-1, 2]].det #=> 5
p Matrix[[2.0, 1.0], [-1.0, 2.0]].det #=> 5.0
//}... -
Matrix
# determinant -> Numeric (23118.0) -
行列式 (determinant) の値を返します。
...行列式 (determinant) の値を返します。
Float を使用すると、精度が不足するため、誤った結果が生じる可能性があることに注意してください。
代わりに、Rational や BigDecimal などの正確なオブジェクトを使用することを検討し......てください。
@raise ExceptionForMatrix::ErrDimensionMismatch 正方行列でない場合に発生します
//emlist[例][ruby]{
require 'matrix'
p Matrix[[2, 1], [-1, 2]].det #=> 5
p Matrix[[2.0, 1.0], [-1.0, 2.0]].det #=> 5.0
//}...