1SWIG wrapper for lmfit 2 3prepared as follows: 4 5$ 6vi lmfit-ruby.i 7swig -ruby lmfit-ruby.i 8ruby extconf.rb 9make 10# 11make install 12 13test: 14 15$ 16irb 17require 'lmfit' 18include Lmfit 19 20a = new_doubleArray(3) 21doubleArray_setitem(a,0,1) 22doubleArray_setitem(a,1,3) 23doubleArray_setitem(a,2,5) 24Lmfit.lm_enorm(3,a) 25 26 27def f(t,p) 28 return p[0]+p[1]*t 29end 30