# File lib/Matriz_densa.rb, line 5
def + (other)
   aux_m = Array.new
   @filas.times do |i|
      aux_m[i] = Array.new                      
      @cols.times do |j|                        
         aux_m[i][j] = 0;
      end
   end
   if other.is_a?(Matriz_dispersa)
      @filas.times do   |i|               
         @cols.times do |j|             
            if other.matriz[i.to_s+"_"+j.to_s] != nil
               aux_m[i][j] = @matriz[i][j] + other.matriz[i.to_s+"_"+j.to_s]
            else
               aux_m[i][j] = @matriz[i][j]
            end
         end
      end
   elsif other.is_a?(Matriz_densa)
      @filas.times do   |i|               
         @cols.times do |j|                     
            aux_m[i][j] = @matriz[i][j] + other.matriz[i][j]
         end
      end
   end 
   Matriz.new(aux_m).comprobar()
end