A library for working with phylogenetic and population genetic data.
v0.32.0
measures.hpp
Go to the documentation of this file.
1
#ifndef GENESIS_PLACEMENT_FUNCTION_MEASURES_H_
2
#define GENESIS_PLACEMENT_FUNCTION_MEASURES_H_
3
4
/*
5
Genesis - A toolkit for working with phylogenetic data.
6
Copyright (C) 2014-2018 Lucas Czech and HITS gGmbH
7
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21
Contact:
22
Lucas Czech <lucas.czech@h-its.org>
23
Exelixis Lab, Heidelberg Institute for Theoretical Studies
24
Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
25
*/
26
34
#include "
genesis/placement/placement_tree.hpp
"
35
36
#include <cstddef>
37
#include <utility>
38
#include <vector>
39
40
namespace
genesis
{
41
42
// =================================================================================================
43
// Forward Declarations
44
// =================================================================================================
45
46
namespace
placement {
47
48
class
Sample;
49
class
SampleSet;
50
class
PlacementTreeEdgeData;
51
class
PlacementTreeNodeData;
52
class
Pquery;
53
class
PqueryPlacement;
54
struct
PqueryPlain;
55
56
}
57
58
namespace
utils {
59
60
template
<
typename
T>
61
class
Matrix;
62
63
class
Histogram;
64
65
}
66
67
namespace
placement {
68
69
// =================================================================================================
70
// Expected Distance between Placement Locations
71
// =================================================================================================
72
85
double
edpl
( Pquery
const
& pquery, utils::Matrix<double>
const
& node_distances );
86
95
std::vector<double>
edpl
( Sample
const
& sample, utils::Matrix<double>
const
& node_distances );
96
107
double
edpl
( Sample
const
& sample, Pquery
const
& pquery );
108
138
std::vector<double>
edpl
( Sample
const
& sample );
139
140
// =================================================================================================
141
// Pairwise Distance
142
// =================================================================================================
143
158
double
pairwise_distance
(
159
const
Sample& smp_a,
160
const
Sample& smp_b,
161
bool
with_pendant_length =
false
162
);
163
164
// double closest_pair_distance (
165
// const Sample& smp_a,
166
// const Sample& smp_b,
167
// bool with_pendant_length = false
168
// );
169
170
// =================================================================================================
171
// Variance
172
// =================================================================================================
173
198
double
variance
(
199
const
Sample& smp,
200
bool
with_pendant_length =
false
201
);
202
203
}
// namespace placement
204
}
// namespace genesis
205
206
#endif // include guard
placement_tree.hpp
genesis::placement::pairwise_distance
double pairwise_distance(const Sample &smp_a, const Sample &smp_b, bool with_pendant_length)
Calculate the normalized pairwise distance between all placements of the two Samples.
Definition:
measures.cpp:127
genesis::placement::variance
double variance(const Sample &smp, bool with_pendant_length)
Calculate the variance of the placements on a tree.
Definition:
measures.cpp:195
genesis
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
Definition:
placement/formats/edge_color.cpp:42
genesis::placement::edpl
double edpl(Pquery const &pquery, utils::Matrix< double > const &node_distances)
Calculate the EDPL uncertainty values for a Pquery.
Definition:
measures.cpp:75
lib
genesis
placement
function
measures.hpp
Generated on Mon Aug 5 2024 16:57:52 for genesis by
1.8.17