Method: Stick::Matrix#column_size
- Defined in:
- lib/stick/matrix/core.rb
#column_size ⇒ Object
Returns the number of columns. Note that it is possible to construct a matrix with uneven columns (e.g. Matrix[ [1,2,3], [4,5] ]), but this is mathematically unsound. This method uses the first row to determine the result.
293 294 295 |
# File 'lib/stick/matrix/core.rb', line 293 def column_size @rows[0].size end |