るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.105秒)
トップページ > クエリ:Ruby[x] > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:-[x] > クエリ:@[x] > クエリ:j[x] > クラス:Matrix[x] > クエリ:column[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

Matrix#column(j) -> Vector | nil (18398.0)

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

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


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

//emlist[例][ruby]{
require 'matrix'

a1 = [ 1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
m = Matrix[a1, a2, a3]

p m.column(1) # => Vector[2, 15, -2]

c...
...nt = 0
m.column(-1) { |x|
cnt = cnt + x
}
p cnt # => 24.5
//}...

Matrix#column(j) {|x| ... } -> self (18398.0)

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

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


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

//emlist[例][ruby]{
require 'matrix'

a1 = [ 1, 2, 3]
a2 = [10, 15, 20]
a3 = [-1, -2, 1.5]
m = Matrix[a1, a2, a3]

p m.column(1) # => Vector[2, 15, -2]

c...
...nt = 0
m.column(-1) { |x|
cnt = cnt + x
}
p cnt # => 24.5
//}...

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

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

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

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

変則的な形状の行列に対してはそれ以上の意味を持ちま...
...合には

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

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

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

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

変則的な形状の行列に対してはそれ以上の意味を持ちま...
...合には

//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...