Class: Abst::SquareMatrix

Inherits:
Matrix
  • Object
show all
Includes:
Ring
Defined in:
lib/include/matrix.rb

Instance Attribute Summary

Attributes inherited from Matrix

#height, #width

Instance Method Summary collapse

Methods included from Ring

#%, #**, #/, included

Methods inherited from Matrix

#*, #add_sub, #each, #initialize, inspect, #inspect, #solve, #to_a, to_s, #to_s

Methods included from Group

included

Constructor Details

This class inherits a constructor from Abst::Matrix

Instance Method Details

#traceObject



116
117
118
# File 'lib/include/matrix.rb', line 116

def trace
	return @coef.map.with_index{|row, i| row[i]}.inject(&:+)
end