るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.010秒)
トップページ > ライブラリ:matrix[x] > クエリ:column[x] > 種類:特異メソッド[x] > クラス:Matrix[x] > クエリ:empty[x]

別のキーワード

  1. matrix column
  2. ripper column
  3. matrix column_vector
  4. matrix column_size
  5. matrix column_count

検索結果

Matrix.empty(row_size=0, column_size=0) -> Matrix (18236.0)

要素を持たない行列を返します。

...です。

row_size 、 column_size のいずれか一方は0である必要があります。

//emlist[例][ruby]{
require 'matrix'
m = Matrix.empty(2, 0)
m == Matrix[ [], [] ]
# => true
n = Matrix.empty(0, 3)
n == Matrix.columns([ [], [], [] ])
# => true
m * n
# => Matrix[[0, 0, 0], [0, 0, 0]]
//...
...}

@param row_size 行列の行数
@param column_size 行列の列数
@raise ArgumentError row_size, column_size が両方とも0でない場合に発生します...