aboutsummaryrefslogtreecommitdiffstats
path: root/ruby/swig/README
blob: ec78ac3c40eb50ebb877345d64c5ff3a4590cc23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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