A library for working with phylogenetic and population genetic data.
v0.32.0
masses.hpp
Go to the documentation of this file.
1 #ifndef GENESIS_PLACEMENT_FUNCTION_MASSES_H_
2 #define GENESIS_PLACEMENT_FUNCTION_MASSES_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 
37 
38 #include <vector>
39 
40 namespace genesis {
41 namespace placement {
42 
43 // =================================================================================================
44 // Mulitplicities
45 // =================================================================================================
46 
51 double total_multiplicity( Pquery const& pqry );
52 
57 double total_multiplicity( Sample const& sample );
58 
59 // =================================================================================================
60 // Masses
61 // =================================================================================================
62 
68 std::vector<double> placement_mass_per_edges_with_multiplicities( Sample const& sample );
69 
77 utils::Matrix<double> placement_mass_per_edges_with_multiplicities( SampleSet const& sample_set );
78 
92 double total_placement_mass_with_multiplicities( Sample const& smp );
93 
94 // =================================================================================================
95 // Masses without Multiplicities
96 // =================================================================================================
97 
110 std::vector<double> placement_mass_per_edge_without_multiplicities( Sample const& sample );
111 
118 utils::Matrix<double> placement_mass_per_edge_without_multiplicities( SampleSet const& sample_set );
119 
129 double total_placement_mass_without_multiplicities( Sample const& smp );
130 
131 } // namespace placement
132 } // namespace genesis
133 
134 #endif // include guard
genesis::placement::total_placement_mass_with_multiplicities
double total_placement_mass_with_multiplicities(Sample const &smp)
Get the mass of all PqueryPlacements of the Sample, using the multiplicities as factors.
Definition: masses.cpp:142
sample_set.hpp
genesis::placement::placement_mass_per_edge_without_multiplicities
std::vector< double > placement_mass_per_edge_without_multiplicities(Sample const &sample)
Return a vector that contains the sum of the masses of the PqueryPlacements per edge of the tree of t...
Definition: masses.cpp:164
matrix.hpp
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::total_placement_mass_without_multiplicities
double total_placement_mass_without_multiplicities(Sample const &smp)
Get the summed mass of all PqueryPlacements in all Pqueries of the given Sample, where mass is measu...
Definition: masses.cpp:217
genesis::placement::placement_mass_per_edges_with_multiplicities
std::vector< double > placement_mass_per_edges_with_multiplicities(Sample const &sample)
Return a vector that contains the sum of the masses of the PqueryPlacements per edge of the tree of t...
Definition: masses.cpp:87
sample.hpp
genesis::placement::total_multiplicity
double total_multiplicity(Pquery const &pqry)
Return the sum of all multiplicities of the Pquery.
Definition: masses.cpp:65