aboutsummaryrefslogtreecommitdiffstats
path: root/models/dlmodel_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'models/dlmodel_template.c')
-rw-r--r--models/dlmodel_template.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/models/dlmodel_template.c b/models/dlmodel_template.c
new file mode 100644
index 0000000..fd7aadb
--- /dev/null
+++ b/models/dlmodel_template.c
@@ -0,0 +1,36 @@
+#include <math.h>
+
+char p1name[2]="k";
+char p2name[2]="b";
+
+int main(int argc,char* argv[])
+{}
+
+
+int get_num_params()
+{
+ return 2;
+}
+
+const char* get_param_name(int n)
+{
+ if(n==0)
+ {
+ return p1name;
+ }
+ return p2name;
+}
+
+double get_default_value(int n)
+{
+ if(n==0)
+ return 1;
+ return 0;
+}
+
+double calc_model(double x,double p[])
+{
+ return p[0]*x+p[1];
+}
+
+