aboutsummaryrefslogtreecommitdiff
path: root/pkg/xtools/inlfit/innlinit.gx
blob: 87c2aab14f5618e86dc25fe87eb26b1a68dd5c42 (plain) (blame)
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
include	"inlfitdef.h"


# IN_NLINIT -- Initialize (reinitialize) NLFIT descriptor. The new
# NLFIT descriptor is returned as a procedure argument.

procedure in_nlinit$t (in, nl)

pointer	in			# INLFIT descriptor
pointer	nl			# NLFIT descriptor

errchk	nlinit(), nlfree()

begin
#	# Debug.
#	call eprintf ("in_nlinit: in=%d, nl=%d\n")
#	    call pargi (in)
#	    call pargi (nl)

	# Free old NLFIT structure if any.
	if (nl != NULL)
	    call nlfree$t (nl)

	# Initialize new NLFIT structure.
	call nlinit$t (nl, IN_FUNC (in), IN_DFUNC (in), Mem$t[IN_PARAM (in)],
	    Mem$t[IN_DPARAM (in)], IN_NPARAMS (in), Memi[IN_PLIST (in)],
	    IN_NFPARAMS (in), IN_TOL$T (in), IN_MAXITER (in))
end