-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstochastic_kinetics.h
47 lines (35 loc) · 1.09 KB
/
stochastic_kinetics.h
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
37
38
39
40
41
42
43
44
45
46
47
//
// stochastic_kinetics.h
// stochastic_test
//
// Created by Claude Rogers on 6/13/12.
// Copyright (c) 2012 California Institute of Technology. All rights reserved.
//
#ifndef stochastic_test_stochastic_kinetics_h
#define stochastic_test_stochastic_kinetics_h
#include <stdio.h>
typedef void(*H_FUNC)(double*, int*);
typedef void(^H_BLOCK)(double*, int*);
// Write data to file for each iteration
void write_line(FILE *f, double t, int *y, int N);
void get_a(double *a, double *h, double *c, int M);
double sum_a(double *a, int M);
int get_mu(double *a, double r2, int M);
void update_y(int *y, int *update_array, int N);
void gillespie(char *filename,
int *y,
int N,
int M,
int update_matrix[M][N],
double *c,
H_FUNC get_h,
double STOP_TIME);
void gillespie_b(char *filename,
int *y,
int N,
int M,
int update_matrix[M][N],
double *c,
H_BLOCK get_h,
double STOP_TIME);
#endif