|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_PLACEMENT_FUNCTION_HELPER_H_
2 #define GENESIS_PLACEMENT_FUNCTION_HELPER_H_
38 #include <unordered_map>
79 bool only_max_lwr_placements =
false
98 bool only_max_lwr_placements =
false
139 std::vector<PqueryPlain>
plain_queries( Sample
const & smp );
226 bool validate( Sample
const& smp,
bool check_values =
false,
bool break_on_values =
false );
231 #endif // include guard
std::vector< size_t > placement_count_per_edge(Sample const &sample)
Return a vector that contains the number of PqueryPlacements per edge of the tree of the Sample.
bool has_correct_edge_nums(PlacementTree const &tree)
Verify that the tree has correctly set edge nums.
std::vector< std::vector< Pquery const * > > pqueries_per_edge(Sample const &sample, bool only_max_lwr_placements)
Return a mapping from each edge to the Pqueries on that edge.
std::vector< PqueryPlain > plain_queries(Sample const &smp)
Return a plain representation of all pqueries of this map.
void rectify_values(Sample &sample)
Correct invalid values of the PqueryPlacements and PqueryNames as good as possible.
bool has_consecutive_edge_nums(PlacementTree const &tree)
Verify that the PlacementTree has no duplicate edge_nums and that they form consecutive numbers start...
std::unordered_map< int, PlacementTreeEdge * > edge_num_to_edge_map(PlacementTree const &tree)
Return a mapping of edge_num integers to the corresponding PlacementTreeEdge object.
tree::Tree PlacementTree
Alias for a tree::Tree used for a tree with information needed for storing Pqueries....
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
tree::TreeEdge PlacementTreeEdge
Alias for tree::TreeEdge used in a PlacementTree. See PlacementEdgeData for the data stored on the ed...
void reset_edge_nums(PlacementTree &tree)
Reset all edge nums of a PlacementTree.
std::vector< std::vector< PqueryPlacement const * > > placements_per_edge(Sample const &smp, bool only_max_lwr_placements)
Return a mapping from each PlacementTreeEdges to the PqueryPlacements that are placed on that edge.
bool validate(Sample const &smp, bool check_values, bool break_on_values)
Validate the integrity of the pointers, references and data in a Sample object.