Method: Mathpack::SLE.make_null_column

Defined in:
lib/mathpack/sle.rb

.make_null_column(step) ⇒ Object



32
33
34
35
36
37
38
39
40
# File 'lib/mathpack/sle.rb', line 32

def self.make_null_column(step)
  (step + 1).upto(@number - 1) do |i|
    alpha = -@matrix[i][step] / @matrix[step][step].to_f
    step.upto(@number - 1) do |j|
      @matrix[i][j] += @matrix[step][j] * alpha
    end
    @f[i] += @f[step] * alpha
  end
end