Method: Mgmg::Mat#submat_add!
- Defined in:
- lib/mgmg/utils.rb
#submat_add!(is, js, other) ⇒ Object
397 398 399 400 401 402 403 404 405 406 407 408 |
# File 'lib/mgmg/utils.rb', line 397 def submat_add!(is, js, other) i_s, i_e = index_treatment(is, row_size) j_s, j_e = index_treatment(js, col_size) i_s.upto(i_e).with_index do |i, io| row = @body[i] o_row = other.body[io] j_s.upto(j_e).with_index do |j, jo| row[j] += o_row[jo] end end self end |