Method: Matrix#to_s
- Defined in:
- lib/matrix.rb
#to_s ⇒ Object
Overrides Object#to_s
1512 1513 1514 1515 1516 1517 1518 1519 1520 |
# File 'lib/matrix.rb', line 1512 def to_s if empty? "#{self.class}.empty(#{row_count}, #{column_count})" else "#{self.class}[" + @rows.collect{|row| "[" + row.collect{|e| e.to_s}.join(", ") + "]" }.join(", ")+"]" end end |