aboutsummaryrefslogtreecommitdiff
path: root/math/nlfit/nllist.x
diff options
context:
space:
mode:
Diffstat (limited to 'math/nlfit/nllist.x')
-rw-r--r--math/nlfit/nllist.x30
1 files changed, 30 insertions, 0 deletions
diff --git a/math/nlfit/nllist.x b/math/nlfit/nllist.x
new file mode 100644
index 00000000..d96351c9
--- /dev/null
+++ b/math/nlfit/nllist.x
@@ -0,0 +1,30 @@
+# NL_LIST -- Procedure to order the list used when the NLFIT structure
+# is initialized.
+
+procedure nl_list (list, nlist, nfit)
+
+int list[ARB] # list
+int nlist # number of elements in the list
+int nfit # number of active list elments
+
+int i, j, nfitp1, ifound
+
+begin
+ nfitp1 = nfit + 1
+
+ do i = 1, nlist {
+ ifound = 0
+ do j = 1, nfit {
+ if (list[j] == i)
+ ifound = ifound + 1
+ }
+ if (ifound == 0) {
+ list[nfitp1] = i
+ nfitp1 = nfitp1 + 1
+ } else if (ifound > 1)
+ call error (0, "Incorrect parameter ordering in plist")
+ }
+
+ if (nfitp1 != (nlist + 1))
+ call error (0, "Incorrect parameter ordering in plist")
+end