biomcmc-lib  0.1
low level library for phylogenetic analysis
Go to the documentation of this file.
1 /*
2  * This file is part of biomcmc-lib, a low-level library for phylogenomic analysis.
3  * Copyright (C) 2019-today Leonardo de Oliveira Martins [ leomrtns at; ]
4  *
5  * biomcmc is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6  * License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7  * version.
9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
10  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11  * details (file "COPYING" or
12  */
18 #ifndef _biomcmc_topology_distance_h_
19 #define _biomcmc_topology_distance_h_
21 #include "topology_common.h"
28 void fill_distance_matrix_from_topology (distance_matrix dist, topology tree, double *blen, bool use_upper);
32 void patristic_distances_from_topology_to_vectors (topology tree, double **dist, double *scaling, int n_dists, double tolerance);
37 void estimate_topology_branch_lengths_from_distances (topology tree, double *dist);
38 double* new_topology_branch_lengths_from_distances (topology tree, double *dist);
39 void correct_negative_branch_lengths_from_topology (topology t, double *blength);
42 #endif
void patristic_distances_from_topology_to_vectors(topology tree, double **dist, double *scaling, int n_dists, double tolerance)
calculates rescaled patristic distances returning up to 6 distinct 1D vectors #dist (externally alloc...
Definition: topology_distance.c:81
General-purpose topology structures created from nexus_tree_struct (and low-level functions) ...
void fill_distance_matrix_from_topology(distance_matrix dist, topology tree, double *blen, bool use_upper)
fill in distance_matrix with the patristic distances from topology (can be used with distinct branch ...
Definition: topology_distance.c:37
distance_matrix new_distance_matrix_for_topology(int nleaves)
allocate memory for a new distance_matrix that will be used on topologies
Definition: topology_distance.c:23
int * create_vector_with_idx_leaves_below_for_patristic(topology tree)
similar to an Euler tour, has list of leaves below each node
Definition: topology_distance.c:118
Definition: distance_matrix.h:29
Binary unrooted topology (rooted at leaf with ID zero)
Definition: topology_common.h:47