るりまサーチ

最速Rubyリファレンスマニュアル検索!
199件ヒット [1-100件を表示] (0.119秒)

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Matrix#row(i) -> Vector | nil (21222.0)

i 番目の行を Vector オブジェクトで返します。 i 番目の行が存在しない場合は nil を返します。 ブロックが与えられた場合はその行の各要素についてブロックを繰り返します。

...i 番目の行を Vector オブジェクトで返します。
i 番目の行が存在しない場合は nil を返します。
ブロックが与えられた場合はその行の各要素についてブロックを繰り返します。

Vector オブジェクトは Matrix オブジェクトとの...
...ください。

@
param i 行の位置を指定します。
先頭の行が 0 番目になります。i の値が負の時には末尾から
のインデックスと見倣します。末尾の行が -1 番目になります。

//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2, 3]
a...
...2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
m = Matrix[a1, a2, a3]

p m.row(1) # => Vector[10, 15, 20]

cnt = 0
m.row(0) { |x|
cnt = cnt + x
}
p cnt # => 6
//}...

Matrix#row(i) {|x| ... } -> self (21122.0)

i 番目の行を Vector オブジェクトで返します。 i 番目の行が存在しない場合は nil を返します。 ブロックが与えられた場合はその行の各要素についてブロックを繰り返します。

...i 番目の行を Vector オブジェクトで返します。
i 番目の行が存在しない場合は nil を返します。
ブロックが与えられた場合はその行の各要素についてブロックを繰り返します。

Vector オブジェクトは Matrix オブジェクトとの...
...ください。

@
param i 行の位置を指定します。
先頭の行が 0 番目になります。i の値が負の時には末尾から
のインデックスと見倣します。末尾の行が -1 番目になります。

//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2, 3]
a...
...2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
m = Matrix[a1, a2, a3]

p m.row(1) # => Vector[10, 15, 20]

cnt = 0
m.row(0) { |x|
cnt = cnt + x
}
p cnt # => 6
//}...

Matrix#cofactor_expansion(row: nil, column: nil) -> object | Integer | Rational | Float (6274.0)

row 行、もしくは column 列に関するラプラス展開をする。

...
row
行、もしくは column 列に関するラプラス展開をする。

通常の行列に対してはこれは単に固有値を計算するだけです。かわりにMatrix#determinant
利用すべきです。

変則的な形状の行列に対してはそれ以上の意味を持ちま...
...
row
行/column列が行列やベクトルである場合には

//emlist[例][ruby]{
require 'matrix'
# Matrix[[7,6], [3,9]].laplace_expansion(column: 1) # => 45
Matrix
[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0) # => Vector[3, -2]
//}

@
param row
@
param column 列
@
raise...
...ArgumentError row と column を両方指定した、もしくは両方とも指定していない、場合に発生します
@
raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します
@
see Matrix#cofactor...

Matrix#cofactor(row, column) -> Integer | Rational | Float (6249.0)

(row, column)-余因子を返します。

...(row, column)-余因子を返します。

各要素の型によって返り値が変わります。

@
param row
@
param column 列
@
raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します。
@
see Matrix#adjugate...

Matrix#first_minor(row, column) -> Matrix (6249.0)

self から第 row 行と第 column 列を取り除いた行列を返します。

...self から第 row 行と第 column 列を取り除いた行列を返します。

@
param row
@
param column 列
@
raise ArgumentError row, column が行列の行数/列数を越えている場合に発生します。...

絞り込み条件を変える

Matrix#each_with_index(which = :all) {|e, row, col| ... } -> self (6227.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) -> Enumerator (6127.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#minor(from_row..to_row, from_col..to_col) -> Matrix (3442.0)

selfの部分行列を返します。

...号..終了列番号

@
param 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#laplace_expansion(row: nil, column: nil) -> object | Integer | Rational | Float (3374.0)

row 行、もしくは column 列に関するラプラス展開をする。

...
row
行、もしくは column 列に関するラプラス展開をする。

通常の行列に対してはこれは単に固有値を計算するだけです。かわりにMatrix#determinant
利用すべきです。

変則的な形状の行列に対してはそれ以上の意味を持ちま...
...
row
行/column列が行列やベクトルである場合には

//emlist[例][ruby]{
require 'matrix'
# Matrix[[7,6], [3,9]].laplace_expansion(column: 1) # => 45
Matrix
[[Vector[1, 0], Vector[0, 1]], [2, 3]].laplace_expansion(row: 0) # => Vector[3, -2]
//}

@
param row
@
param column 列
@
raise...
...ArgumentError row と column を両方指定した、もしくは両方とも指定していない、場合に発生します
@
raise ExceptionForMatrix::ErrDimensionMismatch 行列が正方でない場合に発生します
@
see Matrix#cofactor...
<< 1 2 > >>