summaryrefslogtreecommitdiff
path: root/controller/fw/git_sucks/levmarq.h
diff options
context:
space:
mode:
authorjaseg <git-bigdata-wsl-arch@jaseg.de>2020-03-02 19:45:39 +0100
committerjaseg <git-bigdata-wsl-arch@jaseg.de>2020-03-02 19:45:39 +0100
commit331ce442c4b8879af41332eebfae14bf29b74fba (patch)
treea434d35d3257868502a9c9982d37c93a545828e3 /controller/fw/git_sucks/levmarq.h
parentd678ae5fbee7c699f81da6de1c23ed3f8615dc6d (diff)
downloadmaster-thesis-331ce442c4b8879af41332eebfae14bf29b74fba.tar.gz
master-thesis-331ce442c4b8879af41332eebfae14bf29b74fba.tar.bz2
master-thesis-331ce442c4b8879af41332eebfae14bf29b74fba.zip
foo
Diffstat (limited to 'controller/fw/git_sucks/levmarq.h')
-rw-r--r--controller/fw/git_sucks/levmarq.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/controller/fw/git_sucks/levmarq.h b/controller/fw/git_sucks/levmarq.h
new file mode 100644
index 0000000..dff13ab
--- /dev/null
+++ b/controller/fw/git_sucks/levmarq.h
@@ -0,0 +1,30 @@
+
+#ifndef __LEVMARQ_H__
+#define __LEVMARQ_H__
+
+typedef struct {
+ int max_it;
+ float init_lambda;
+ float up_factor;
+ float down_factor;
+ float target_derr;
+ int final_it;
+ float final_err;
+ float final_derr;
+} LMstat;
+
+void levmarq_init(LMstat *lmstat);
+
+int levmarq(int npar, float *par, int ny, float *y, float *dysq,
+ float (*func)(float *, int, void *),
+ void (*grad)(float *, float *, int, void *),
+ void *fdata, LMstat *lmstat);
+
+float error_func(float *par, int ny, float *y, float *dysq,
+ float (*func)(float *, int, void *), void *fdata);
+
+void solve_axb_cholesky(int n, float l[n][n], float x[n], float b[n]);
+
+int cholesky_decomp(int n, float l[n][n], float a[n][n]);
+
+#endif /* __LEVMARQ_H__ */