Method: Abst::Matrix#add_sub

Defined in:
lib/include/matrix.rb

#add_sub(op, other) ⇒ Object



41
42
43
# File 'lib/include/matrix.rb', line 41

def add_sub(op, other)
  return self.class.new(@coef.zip(other.coef).map{|a, b| a.__send__(op, b)})
end