242件ヒット
[1-100件を表示]
(0.061秒)
種類
- インスタンスメソッド (220)
- クラス (11)
- 特異メソッド (11)
キーワード
- * (11)
-
/ (11) - == (11)
- ErrDimensionMismatch (11)
-
angle
_ with (11) - coerce (11)
- collect (12)
- collect! (12)
- each (22)
-
each
_ with _ index (22) - eql? (11)
-
hadamard
_ product (7) - hash (22)
- hermitian? (11)
- hstack (22)
- map (12)
- map! (12)
- orthogonal? (11)
検索結果
先頭5件
-
Matrix
# each _ with _ index(which = :all) -> Enumerator (18302.0) -
行列の各要素をその位置とともに引数としてブロックを呼び出します。
...。
which で処理する要素の範囲を指定することができます。
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 (18302.0) -
行列の各要素をその位置とともに引数としてブロックを呼び出します。
...。
which で処理する要素の範囲を指定することができます。
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... -
ExceptionForMatrix
:: ErrDimensionMismatch (15002.0) -
行列/ベクトル計算時に次元が合わない場合に発生する例外です。
行列/ベクトル計算時に次元が合わない場合に発生する例外です。 -
Matrix
# hermitian? -> bool (12202.0) -
行列がエルミートならば true を返します。
...行列がエルミートならば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します... -
Vector
# angle _ with(v) -> Float (12202.0) -
v と self がなす角度を返します。
...mlist[例][ruby]{
require 'matrix'
Vector[1, 0].angle_with(Vector[0, 1]) # => Math::PI/2
//}
@param v このベクトルと self とがなす角度を計算します
@raise ZeroVectorError self もしくは v のどちらかが零ベクトルである場合に
発生します
@raise Exceptio......nForMatrix::ErrDimensionMismatch v と self の
ベクトルの次元が異なる場合に発生します。... -
Matrix
# each(which = :all) -> Enumerator (9202.0) -
行列の各要素を引数としてブロックを呼び出します。
...、…という順番で処理します。
which に以下の Symbol を指定することで
引数として使われる要素を限定することができます。
* :all - すべての要素(デフォルト)
* :diagonal - 対角要素
* :off_diagonal 対角要素以外
* :lower 対角成......* :strict_lower 対角成分の下側
* :strict_upper 対角成分の上側
ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lowe......r).to_a # => [3]
//}
@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each_with_index, Matrix#map... -
Matrix
# each(which = :all) {|e| . . . } -> self (9202.0) -
行列の各要素を引数としてブロックを呼び出します。
...、…という順番で処理します。
which に以下の Symbol を指定することで
引数として使われる要素を限定することができます。
* :all - すべての要素(デフォルト)
* :diagonal - 対角要素
* :off_diagonal 対角要素以外
* :lower 対角成......* :strict_lower 対角成分の下側
* :strict_upper 対角成分の上側
ブロックを省略した場合、 Enumerator を返します。
//emlist[例][ruby]{
require 'matrix'
Matrix[ [1,2], [3,4] ].each { |e| puts e }
# => prints the numbers 1 to 4
Matrix[ [1,2], [3,4] ].each(:strict_lowe......r).to_a # => [3]
//}
@param which どの要素に対してブロックを呼び出すのかを Symbol で指定します
@see Matrix#each_with_index, Matrix#map... -
Matrix
# hash -> Integer (9202.0) -
行列のHash値を返します。
...行列のHash値を返します。... -
Matrix
# hstack(*matrices) -> Matrix (9202.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
. hstack(*matrices) -> Matrix (9202.0) -
行列 matrices を横に並べた行列を生成します。
...行列 matrices を横に並べた行列を生成します。
//emlist[例][ruby]{
require 'matrix'
x = Matrix[[1, 2], [3, 4]]
y = Matrix[[5, 6], [7, 8]]
Matrix.hstack(x, y) # => Matrix[[1, 2, 5, 6], [3, 4, 7, 8]]
//}
@param matrices 並べる行列。すべての行列の行数が一致してい......なければならない
@raise ExceptionForMatrix::ErrDimensionMismatch 行数の異なる行列がある場合に発生します
@see Matrix.vstack, Matrix#hstack...