るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
14件ヒット [1-14件を表示] (0.127秒)
トップページ > クエリ:i[x] > クエリ:h[x] > バージョン:2.3.0[x] > クラス:Matrix[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

ライブラリ

キーワード

検索結果

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 比較対象のオブジェクト