RNAlib-2.4.10
grammar.h
Go to the documentation of this file.
1 #ifndef VIENNA_RNA_PACKAGE_GRAMMAR_H
2 #define VIENNA_RNA_PACKAGE_GRAMMAR_H
3 
17 
18 typedef int (vrna_callback_gr_rule)(vrna_fold_compound_t *vc,
19  int i,
20  int j,
21  void *data);
22 
23 
24 typedef FLT_OR_DBL (vrna_callback_gr_rule_exp)(vrna_fold_compound_t *vc,
25  int i,
26  int j,
27  void *data);
28 
29 
30 typedef void (vrna_callback_gr_cond)(vrna_fold_compound_t *fc,
31  unsigned char stage,
32  void *data);
33 
34 
35 typedef void (vrna_callback_gr_free_data)(void *data);
36 
37 
38 typedef struct vrna_gr_aux_s vrna_gr_aux_t;
39 
40 
41 struct vrna_gr_aux_s {
42  vrna_callback_gr_cond *cb_proc;
44  vrna_callback_gr_rule *cb_aux_f;
45  vrna_callback_gr_rule *cb_aux_c;
46  vrna_callback_gr_rule *cb_aux_m;
47  vrna_callback_gr_rule *cb_aux_m1;
48  vrna_callback_gr_rule *cb_aux;
49 
50  vrna_callback_gr_rule_exp *cb_aux_exp_f;
51  vrna_callback_gr_rule_exp *cb_aux_exp_c;
52  vrna_callback_gr_rule_exp *cb_aux_exp_m;
53  vrna_callback_gr_rule_exp *cb_aux_exp_m1;
54  vrna_callback_gr_rule_exp *cb_aux_exp;
55 
56  void *data;
57  vrna_callback_gr_free_data *free_data;
58 };
59 
60 
61 int
62 vrna_gr_set_aux_f(vrna_fold_compound_t *fc,
63  vrna_callback_gr_rule *cb);
64 
65 
66 int
67 vrna_gr_set_aux_exp_f(vrna_fold_compound_t *fc,
68  vrna_callback_gr_rule_exp *cb);
69 
70 
71 int
72 vrna_gr_set_aux_c(vrna_fold_compound_t *fc,
73  vrna_callback_gr_rule *cb);
74 
75 
76 int
77 vrna_gr_set_aux_exp_c(vrna_fold_compound_t *fc,
78  vrna_callback_gr_rule_exp *cb);
79 
80 
81 int
82 vrna_gr_set_aux_m(vrna_fold_compound_t *fc,
83  vrna_callback_gr_rule *cb);
84 
85 
86 int
87 vrna_gr_set_aux_exp_m(vrna_fold_compound_t *fc,
88  vrna_callback_gr_rule_exp *cb);
89 
90 
91 int
92 vrna_gr_set_aux_m1(vrna_fold_compound_t *fc,
93  vrna_callback_gr_rule *cb);
94 
95 
96 int
97 vrna_gr_set_aux_exp_m1(vrna_fold_compound_t *fc,
98  vrna_callback_gr_rule_exp *cb);
99 
100 
101 int
102 vrna_gr_set_aux(vrna_fold_compound_t *fc,
103  vrna_callback_gr_rule *cb);
104 
105 
106 int
107 vrna_gr_set_aux_exp(vrna_fold_compound_t *fc,
108  vrna_callback_gr_rule_exp *cb);
109 
110 
111 int
112 vrna_gr_set_data(vrna_fold_compound_t *fc,
113  void *data,
114  vrna_callback_gr_free_data *free_data);
115 
116 
117 int
118 vrna_gr_set_cond(vrna_fold_compound_t *fc,
119  vrna_callback_gr_cond *cb);
120 
121 
122 int
123 vrna_gr_reset(vrna_fold_compound_t *fc);
124 
125 
135 #endif
vrna_callback_gr_cond * cb_proc
A callback for pre- and post-processing of auxiliary grammar rules.
Definition: grammar.h:42
double FLT_OR_DBL
Typename for floating point number in partition function computations.
Definition: basic.h:43
The most basic data structure required by many functions throughout the RNAlib.
Definition: fold_compound.h:132
Definition: grammar.h:41
The Basic Fold Compound API.