|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_PLACEMENT_SAMPLE_H_
2 #define GENESIS_PLACEMENT_SAMPLE_H_
36 #include <unordered_map>
208 Pquery const&
at(
size_t index )
const;
216 void remove(
size_t index );
222 void remove(
size_t first_index,
size_t last_index );
289 std::vector<Pquery> pqueries_;
296 std::unordered_map<std::string, std::string>
metadata;
303 #endif // include guard
PlacementTree & tree()
Get the PlacementTree of this Sample.
size_t size() const
Return the number of Pqueries that are stored in this Sample.
iterator_pqueries end()
Return an iterator to the end of the Pqueries of this Sample.
void clear_pqueries()
Clear all Pqueries of this Sample.
Manage a set of Pqueries along with the PlacementTree where the PqueryPlacements are placed on.
std::vector< Pquery >::const_iterator const_iterator_pqueries
bool empty() const
Return whether the tree or the set of Pqueries is empty.
Pquery & add()
Create an empty Pquery, add it to the Sample and return it.
Sample & operator=(Sample const &)
Copy assignment.
Class for representing phylogenetic trees.
std::vector< Pquery >::iterator iterator_pqueries
iterator_pqueries begin()
Return an iterator to the beginning of the Pqueries of this Sample.
A pquery holds a set of PqueryPlacements and a set of PqueryNames.
Pquery & at(size_t index)
Return the Pquery at a certain index.
Sample()=default
Default constructor.
Simple wrapper for typical begin() and end() iterators, to be used in range-based for loops.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
void clear()
Clears all data of this object.
void swap(Sample &other)
Swap the contents of this Sample with the contents of another Sample.
void remove(size_t index)
Remove the Pquery at a given index from the Sample.
utils::Range< iterator_pqueries > pqueries()
Return a Range iterator to the Pqueries .
std::unordered_map< std::string, std::string > metadata