14件ヒット
[1-14件を表示]
(0.127秒)
種類
- インスタンスメソッド (13)
- 特異メソッド (1)
ライブラリ
- matrix (14)
キーワード
- * (1)
-
/ (1) - == (1)
- coerce (1)
- each (2)
-
each
_ with _ index (2) - eql? (1)
- hash (1)
- hermitian? (1)
- hstack (2)
- orthogonal? (1)
検索結果
先頭5件
-
Matrix
# each _ with _ index(which = :all) -> Enumerator (54904.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 (54904.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
# hermitian? -> bool (36604.0) -
行列がエルミートならば true を返します。
...行列がエルミートならば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します... -
Matrix
# each(which = :all) -> Enumerator (27604.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 (27604.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
# hash -> Integer (27604.0) -
行列のHash値を返します。
行列のHash値を返します。 -
Matrix
# hstack(*matrices) -> Matrix (27604.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 (27604.0) -
行列 matrices を横に並べた行列を生成します。
...[例][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... -
Matrix
# orthogonal? -> bool (27304.0) -
行列が直交行列ならば true を返します。
...行列が直交行列ならば true を返します。
@raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方行列でない場合に発生します... -
Matrix
# *(other) -> Matrix (9604.0) -
self の各成分に数 other を掛けた行列を返します。
self の各成分に数 other を掛けた行列を返します。
@param other self の各成分に掛ける Numeric オブジェクトを指定します。 -
Matrix
# / (other) -> Matrix (9604.0) -
self の各成分を数 other で割った行列を返します。
self の各成分を数 other で割った行列を返します。
@param other self の各成分を割る Numeric オブジェクトを指定します。 -
Matrix
# ==(other) -> bool (9304.0) -
自分自身と other を比較し、同値であれば真(true)を返します。
自分自身と other を比較し、同値であれば真(true)を返します。
@param other 比較対象のオブジェクト -
Matrix
# coerce(other) -> Array (9304.0) -
他の数値オブジェクトとの変換を行います。
...クトをMatrix::Scalarのオブジェクトに変換し、selfとの組を配列として返します。
@param other 変換する数値オブジェクト
//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2]
a2 = [-1.25, 2.2]
m = Matrix[a1, a2]
r = Rational(1, 2)
p m.coerce(r) #=> [#<Matrix::Scalar:......0x832df18 @value=(1/2)>, Matrix[[1, 2], [-1.25, 2.2]]]
//}... -
Matrix
# eql?(other) -> bool (9304.0) -
自分自身と other を比較し、同値であれば真(true)を返します。
自分自身と other を比較し、同値であれば真(true)を返します。
@param other 比較対象のオブジェクト