summaryrefslogtreecommitdiff
path: root/linear.c
diff options
context:
space:
mode:
Diffstat (limited to 'linear.c')
-rw-r--r--linear.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/linear.c b/linear.c
index 714eef1..77fd52d 100644
--- a/linear.c
+++ b/linear.c
@@ -18,6 +18,46 @@
** matrix).
*/
+/*
+** DEFINES
+*/
+
+#define LUARRAYROWS 101L
+#define LUARRAYCOLS 101L
+
+/*
+** TYPEDEFS
+*/
+typedef struct
+{ union
+ { double *p;
+ double (*ap)[][LUARRAYCOLS];
+ } ptrs;
+} LUdblptr;
+
+/*
+** GLOBALS
+*/
+double *LUtempvv;
+
+/*
+** PROTOTYPES
+*/
+static void LUFreeMem(double *a, double *b,
+ double *abase, double *bbase);
+static unsigned long DoLUIteration(double *a, double *b,
+ double *abase, double *bbase,
+ unsigned long numarrays);
+static void build_problem( double a[][LUARRAYCOLS],
+ int n, double b[LUARRAYROWS]);
+static int ludcmp(double a[][LUARRAYCOLS],
+ int n, int indx[], int *d);
+static void lubksb(double a[][LUARRAYCOLS],
+ int n, int indx[LUARRAYROWS],
+ double b[LUARRAYROWS]);
+static int lusolve(double a[][LUARRAYCOLS],
+ int n, double b[LUARRAYROWS]);
+
/*********
** DoLU **
**********