MorphyLib
Phylogenetic data reconstruction library accommodating inapplicable data
morphy.h
1 //
2 // morphy.h
3 // MorPhy2
4 //
5 // Created by mbrazeau on 23/04/2017.
6 // Copyright © 2017 brazeaulab. All rights reserved.
7 //
8 
9 #ifndef morphy_h
10 #define morphy_h
11 
12 #ifdef DEBUG
13 #include <stdio.h>
14 #define dbg_printf(...) printf(__VA_ARGS__)
15 #else
16 #define dbg_printf(...)
17 #endif
18 
19 #include <stdlib.h>
20 #include <assert.h>
21 #include <string.h>
22 //#include <glib.h>
23 
24 //typedef struct mplarray_s {
25 // int nelems;
26 // int maxelems;
27 // size_t elemsize;
28 // void **data;
29 //} MPLarray;
30 
31 /* Function prototypes */
32 
33 Morphyp mpl_new_Morphy_t(void);
34 void* mpl_get_from_matrix(const int row, const int col, const int ncol, const size_t size, const void* data);
35 int mpl_set_numtaxa(const int ntax, Morphyp m);
36 int mpl_set_num_charac(const int ncharac, Morphyp m);
37 int mpl_get_gaphandl(Morphyp handl);
38 int mpl_check_data_loaded(Morphyp m);
39 char mpl_get_gap_symbol(Morphyp handl);
40 MPLchtype* mpl_get_charac_types(Morphyp handl);
41 int mpl_assign_partition_fxns(MPLpartition* part);
42 int mpl_fetch_parsim_fxn_setter (void(**pars_assign)(MPLpartition*), MPLchtype chtype);
43 int mpl_extend_intarray(int** array, size_t size);
44 int mpl_part_push_index(int newint, MPLpartition* part);
45 int mpl_part_remove_index(int index, MPLpartition* part);
46 int mpl_delete_partition(MPLpartition* part);
47 MPLpartition* mpl_new_partition(const MPLchtype chtype, const bool hasNA);
48 int mpl_count_gaps_in_columns(Morphyp handl);
49 int mpl_setup_partitions(Morphyp handle);
50 int mpl_get_numparts(Morphyp handl);
51 MPLndsets* mpl_alloc_stateset(int numchars);
52 void mpl_free_stateset(MPLndsets* statesets);
53 int mpl_delete_all_partitions(Morphyp handl);
54 int mpl_setup_statesets(Morphyp handl);
55 int mpl_destroy_statesets(Morphyp handl);
56 int mpl_copy_data_into_tips(Morphyp handl);
57 int mpl_update_root(MPLndsets* lower, MPLndsets* upper, MPLpartition* part);
58 int mpl_update_NA_root(MPLndsets* lower, MPLndsets* upper, MPLpartition* part);
59 
60 //MPLarray* mpl_new_array(size_t elemsize);
61 //void mpl_destroy_array(MPLarray* arr);
62 #endif /* morphy_h */
Definition: morphydefs.h:129
Definition: morphydefs.h:110
Definition: morphydefs.h:165