MorphyLib
Phylogenetic data reconstruction library accommodating inapplicable data
mpl.h
Go to the documentation of this file.
1 
40 #ifndef mpl_h
41 #define mpl_h
42 
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif /*__cplusplus */
47 
48 #include <stdbool.h>
49 #include "morphydefs.h"
50 #include "mplerror.h"
51 
52 
53 // Public functions
54 
65 Morphy mpl_new_Morphy
66 
67  (void);
68 
69 
83 
84  (Morphy m);
85 
86 
104 int mpl_init_Morphy
105 
106  (const int ntax,
107  const int nchar,
108  Morphy m);
109 
110 
122 int mpl_get_numtaxa
123 
124  (Morphy m);
125 
126 
139 
140  (Morphy m);
141 
142 
159 
160  (const int nnodes,
161  Morphy m);
162 
177 
178  (Morphy m);
179 
201 
202  (const char* symbols,
203  Morphy m);
204 
205 
220 char* mpl_get_symbols
221 
222  (const Morphy m);
223 
224 
243 
244  (const char* rawmatrix,
245  Morphy m);
246 
247 
260 
261  (Morphy m);
262 
263 
264 int mpl_set_gap_symbol
265 
266  (const char gapsymb,
267  Morphy m);
268 
269 
270 int mpl_set_missing_symbol
271 
272  (const char missymb,
273  Morphy m);
274 
275 
290 
291  (Morphy m);
292 
293 
294 int mpl_incl_charac
295 
296  (const int charID,
297  Morphy m);
298 
299 
300 int mpl_excl_charac
301 
302  (const int charID,
303  Morphy m);
304 
305 
306 int mpl_set_charac_weight
307 
308  (const int charID,
309  Mflt weight);
310 
311 
331 
332  (const int charID,
333  const MPLchtype chtype,
334  Morphy m);
335 
336 
356 
357  (const gap_t gaptype,
358  Morphy m);
359 
373 
374  (Morphy m);
375 
376 
402 
403  (const int node_id,
404  const int left_id,
405  const int right_id,
406  Morphy m);
407 
408 
435  (const int node_id,
436  const int left_id,
437  const int right_id,
438  const int anc_id,
439  Morphy m);
440 
441 
467 
468  (const int node_id,
469  const int left_id,
470  const int right_id,
471  Morphy m);
472 
473 
501 
502  (const int node_id,
503  const int left_id,
504  const int right_id,
505  const int anc_id,
506  Morphy m);
507 
508 
535 int mpl_update_tip
536 
537  (const int tip_id,
538  const int anc_id,
539  Morphy m);
540 
566 
567  (const int tip_id,
568  const int anc_id,
569  Morphy m);
570 
571 
592 
593  (const int l_root_id,
594  const int root_id,
595  Morphy m);
596 
597 int mpl_get_insertcost
598 
599  (const int srcID,
600  const int tgt1ID,
601  const int tgt2ID,
602  bool max,
603  int cutoff,
604  Morphy m);
605 
606 
607 int mpl_get_packed_states
608 
609  (const int nodeID,
610  const int character,
611  int passnum,
612  Morphy m);
613 
614 
615 char* mpl_get_stateset
616  (const int nodeID,
617  const int character,
618  int passnum,
619  Morphy m);
620 
621 #ifdef __cplusplus
622 }
623 #endif /*__cplusplus */
624 
625 #endif /* mpl_h */
int mpl_second_down_recon(const int node_id, const int left_id, const int right_id, Morphy m)
Performs the second nodal reconstructions for characters with inapplicability.
Definition: mpl.c:398
int mpl_update_tip(const int tip_id, const int anc_id, Morphy m)
Initial update of tip values following uppass reconstruction.
Definition: mpl.c:453
int mpl_set_num_internal_nodes(const int nnodes, Morphy m)
Sets the number of internal nodes in the dataset.
Definition: mpl.c:112
int mpl_delete_rawdata(Morphy m)
Deletes the caller-input data.
Definition: mpl.c:222
int mpl_finalize_tip(const int tip_id, const int anc_id, Morphy m)
Finalizes ambiguous or missing values in the tips.
Definition: mpl.c:477
int mpl_get_num_charac(Morphy m)
Retrieve the number of taxa (rows) in the dataset.
Definition: mpl.c:102
int mpl_set_parsim_t(const int charID, const MPLchtype chtype, Morphy m)
Sets a character&#39;s parsimony function type.
Definition: mpl.c:283
char * mpl_get_symbols(const Morphy m)
Retrieves the current list of symbols.
Definition: mpl.c:183
int mpl_attach_rawdata(const char *rawmatrix, Morphy m)
Attach raw character state data (i.e. tip data).
Definition: mpl.c:192
int mpl_first_up_recon(const int node_id, const int left_id, const int right_id, const int anc_id, Morphy m)
Reconstructs the second (uppass) nodal reconstructions.
Definition: mpl.c:370
int mpl_update_lower_root(const int l_root_id, const int root_id, Morphy m)
Updates the nodal sets for a lower (&#39;dummy&#39;) root node.
Definition: mpl.c:500
int mpl_query_gaphandl(Morphy m)
Returns the type of gap handling method currently in effect.
Definition: mpl.c:333
int mpl_get_numtaxa(Morphy m)
Retrieve the number of taxa (rows) in the dataset.
Definition: mpl.c:92
int mpl_first_down_recon(const int node_id, const int left_id, const int right_id, Morphy m)
Reconstructs the first (downpass) nodal reconstructions.
Definition: mpl.c:344
Error codes and descriptions for MorphyLib.
int mpl_init_Morphy(const int ntax, const int nchar, Morphy m)
Sets up the dimensions of the dataset.
Definition: mpl.c:44
int mpl_set_gaphandl(const gap_t gaptype, Morphy m)
Tells MorphyLib how to treat the gap symbol.
Definition: mpl.c:321
int mpl_apply_tipdata(Morphy m)
Commits parameters prior to nodal set calculations.
Definition: mpl.c:240
int mpl_delete_Morphy(Morphy m)
Destroys an instance of a Morphy object.
Definition: mpl.c:24
int mpl_get_num_internal_nodes(Morphy m)
Gets the number of internal nodal reconstruction sets being used by MorphyLib.
Definition: mpl.c:129
int mpl_second_up_recon(const int node_id, const int left_id, const int right_id, const int anc_id, Morphy m)
Finalises the ancestral state reconstructions for characters with inapplicable values.
Definition: mpl.c:427
int mpl_attach_symbols(const char *symbols, Morphy m)
Attach a caller-specified list of symbols.
Definition: mpl.c:139
Morphy mpl_new_Morphy(void)
Creates a new instance of a Morphy object.
Definition: mpl.c:16