aboutsummaryrefslogtreecommitdiffstats
path: root/models/dlmodel_template.c
blob: fd7aadb3e77c2bf4b225cc77013a76936e408f02 (plain)
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
29
30
31
32
33
34
35
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];
}