Class: Abst::SquareMatrix
- Includes:
- Ring
- Defined in:
- lib/include/matrix.rb
Instance Attribute Summary
Attributes inherited from Matrix
Instance Method Summary collapse
Methods included from Ring
Methods inherited from Matrix
#*, #add_sub, #each, #initialize, inspect, #inspect, #solve, #to_a, to_s, #to_s
Methods included from Group
Constructor Details
This class inherits a constructor from Abst::Matrix
Instance Method Details
#trace ⇒ Object
116 117 118 |
# File 'lib/include/matrix.rb', line 116 def trace return @coef.map.with_index{|row, i| row[i]}.inject(&:+) end |