empty

empty(row_count = 0, column_count = 0)
Class Public methods

Creates a empty matrix of row_count x column_count. At least one of row_count or column_count must be 0.

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]]
doc_ruby_on_rails
2015-04-18 05:25:30
Comments
Leave a Comment

Please login to continue.