Method: Matrix#join_bottom
- Defined in:
- lib/y_support/stdlib_ext/matrix/misc.rb
#join_bottom(other) ⇒ Object
join_bottom method
62 63 64 65 66 67 68 |
# File 'lib/y_support/stdlib_ext/matrix/misc.rb', line 62 def join_bottom other; raise ArgumentError, "Column size mismatch" unless column_size == other.column_size return other.map { |e| e } if row_size == 0 return Matrix.empty row_size + other.row_size, 0 if column_size == 0 self.class[ *( row_vectors + other.row_vectors ) ] end |