1 #ifndef GENESIS_TAXONOMY_ITERATOR_POSTORDER_H_ 2 #define GENESIS_TAXONOMY_ITERATOR_POSTORDER_H_ 59 std::function<
void(
Taxon& )> fn,
60 bool include_inner_taxa =
true 62 for(
auto& t : tax ) {
65 if( include_inner_taxa || t.size() == 0 ) {
83 std::function<
void(
Taxon const& )> fn,
84 bool include_inner_taxa =
true 86 for(
auto const& t : tax ) {
89 if( include_inner_taxa || t.size() == 0 ) {
98 #endif // include guard
void postorder_for_each(Taxonomy &tax, std::function< void(Taxon &)> fn, bool include_inner_taxa=true)
Apply a function to all taxa of the Taxonomy, traversing it in postorder.
Container namespace for all symbols of genesis in order to keep them separate when used as a library...
Store a Taxonomy, i.e., a nested hierarchy of Taxa.
Store a Taxon, i.e., an element in a Taxonomy, with its name, rank, ID and sub-taxa.