You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
334 B
30 lines
334 B
SWIG wrapper for lmfit
|
|
|
|
prepared as follows:
|
|
|
|
$
|
|
vi lmfit-ruby.i
|
|
swig -ruby lmfit-ruby.i
|
|
ruby extconf.rb
|
|
make
|
|
#
|
|
make install
|
|
|
|
test:
|
|
|
|
$
|
|
irb
|
|
require 'lmfit'
|
|
include Lmfit
|
|
|
|
a = new_doubleArray(3)
|
|
doubleArray_setitem(a,0,1)
|
|
doubleArray_setitem(a,1,3)
|
|
doubleArray_setitem(a,2,5)
|
|
Lmfit.lm_enorm(3,a)
|
|
|
|
|
|
def f(t,p)
|
|
return p[0]+p[1]*t
|
|
end
|