RNAlib-2.4.14
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 void (vrna_callback_gr_rule_aux)(vrna_fold_compound_t *vc,
25  int i,
26  int j,
27  void *data);
28 
29 
30 typedef FLT_OR_DBL (vrna_callback_gr_rule_exp)(vrna_fold_compound_t *vc,
31  int i,
32  int j,
33  void *data);
34 
35 
36 typedef void (vrna_callback_gr_rule_aux_exp)(vrna_fold_compound_t *vc,
37  int i,
38  int j,
39  void *data);
40 
41 
42 typedef void (vrna_callback_gr_cond)(vrna_fold_compound_t *fc,
43  unsigned char stage,
44  void *data);
45 
46 
47 typedef void (vrna_callback_gr_free_data)(void *data);
48 
49 
50 typedef struct vrna_gr_aux_s vrna_gr_aux_t;
51 
52 
53 struct vrna_gr_aux_s {
54  vrna_callback_gr_cond *cb_proc;
56  vrna_callback_gr_rule *cb_aux_f;
57  vrna_callback_gr_rule *cb_aux_c;
58  vrna_callback_gr_rule *cb_aux_m;
59  vrna_callback_gr_rule *cb_aux_m1;
60  vrna_callback_gr_rule_aux *cb_aux;
61 
62  vrna_callback_gr_rule_exp *cb_aux_exp_f;
63  vrna_callback_gr_rule_exp *cb_aux_exp_c;
64  vrna_callback_gr_rule_exp *cb_aux_exp_m;
65  vrna_callback_gr_rule_exp *cb_aux_exp_m1;
66  vrna_callback_gr_rule_aux_exp *cb_aux_exp;
67 
68  void *data;
69  vrna_callback_gr_free_data *free_data;
70 };
71 
72 
73 int
74 vrna_gr_set_aux_f(vrna_fold_compound_t *fc,
75  vrna_callback_gr_rule *cb);
76 
77 
78 int
79 vrna_gr_set_aux_exp_f(vrna_fold_compound_t *fc,
80  vrna_callback_gr_rule_exp *cb);
81 
82 
83 int
84 vrna_gr_set_aux_c(vrna_fold_compound_t *fc,
85  vrna_callback_gr_rule *cb);
86 
87 
88 int
89 vrna_gr_set_aux_exp_c(vrna_fold_compound_t *fc,
90  vrna_callback_gr_rule_exp *cb);
91 
92 
93 int
94 vrna_gr_set_aux_m(vrna_fold_compound_t *fc,
95  vrna_callback_gr_rule *cb);
96 
97 
98 int
99 vrna_gr_set_aux_exp_m(vrna_fold_compound_t *fc,
100  vrna_callback_gr_rule_exp *cb);
101 
102 
103 int
104 vrna_gr_set_aux_m1(vrna_fold_compound_t *fc,
105  vrna_callback_gr_rule *cb);
106 
107 
108 int
109 vrna_gr_set_aux_exp_m1(vrna_fold_compound_t *fc,
110  vrna_callback_gr_rule_exp *cb);
111 
112 
113 int
114 vrna_gr_set_aux(vrna_fold_compound_t *fc,
115  vrna_callback_gr_rule_aux *cb);
116 
117 
118 int
119 vrna_gr_set_aux_exp(vrna_fold_compound_t *fc,
120  vrna_callback_gr_rule_aux_exp *cb);
121 
122 
123 int
124 vrna_gr_set_data(vrna_fold_compound_t *fc,
125  void *data,
126  vrna_callback_gr_free_data *free_data);
127 
128 
129 int
130 vrna_gr_set_cond(vrna_fold_compound_t *fc,
131  vrna_callback_gr_cond *cb);
132 
133 
134 int
135 vrna_gr_reset(vrna_fold_compound_t *fc);
136 
137 
147 #endif
vrna_callback_gr_cond * cb_proc
A callback for pre- and post-processing of auxiliary grammar rules.
Definition: grammar.h:54
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:53
The Basic Fold Compound API.