End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Jacobian#jacobian
jacobian(f,fx,x)
ext/bigdecimal/lib/bigdecimal/jacobian.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/ext/bigdecimal/lib/bigdecimal/jacobian.rb, line 79
def jacobian(f,fx,x)
n = x.size
dfdx = Array.new(n*n)
for i in 0...n do
df = dfdxi(f,fx,x,i)
for j in 0...n do
dfdx[j*n+i] = df[j]
end
end
dfdx
end
Computes the Jacobian of f at x. fx is the value of f at x.