Empirical
|
A Taxon represents a type of organism in a phylogeny. More...
#include <Systematics.h>
Public Types | |
using | data_t = DATA_STRUCT |
Public Member Functions | |
Taxon (size_t _id, const info_t &_info, Ptr< this_t > _parent=nullptr) | |
Taxon (const Taxon &)=delete | |
Taxon (Taxon &&)=default | |
Taxon & | operator= (const Taxon &)=delete |
Taxon & | operator= (Taxon &&)=default |
size_t | GetID () const |
Get a unique ID for this taxon; IDs are assigned sequentially, so newer taxa have higher IDs. More... | |
const info_t & | GetInfo () const |
Retrieve the tracked info associated with this Taxon. More... | |
Ptr< this_t > | GetParent () const |
Retrieve a pointer to the parent Taxon. More... | |
size_t | GetNumOrgs () const |
Get the number of living organisms currently associated with this Taxon. More... | |
size_t | GetTotOrgs () const |
Get the total number of organisms that have ever lived associated with this Taxon. More... | |
size_t | GetNumOff () const |
Get the number of taxa that were produced by organisms from this Taxon. More... | |
size_t | GetDepth () const |
Get the number of taxanomic steps since the ancestral organism was injected into the World. More... | |
data_t & | GetData () |
const data_t & | GetData () const |
double | GetOriginationTime () const |
void | SetOriginationTime (double time) |
void | AddOrg () |
Add a new organism to this Taxon. More... | |
void | AddOffspring () |
Add a new offspring Taxon to this one. More... | |
void | AddTotalOffspring () |
Recursively increment total offspring count for this and all ancestors. More... | |
int | GetTotalOffspring () |
bool | RemoveOrg () |
bool | RemoveOffspring () |
Remove and offspring taxa after its entire sub-tree has died out (pruning) More... | |
void | RemoveTotalOffspring () |
Protected Types | |
using | this_t = Taxon< ORG_INFO, DATA_STRUCT > |
using | info_t = ORG_INFO |
Protected Attributes | |
size_t | id |
ID for this Taxon (Unique within this Systematics) More... | |
const info_t | info |
Details for the organims associated within this taxanomic group. More... | |
Ptr< this_t > | parent |
Pointer to parent group (nullptr if injected) More... | |
size_t | num_orgs |
How many organisms currently exist of this group? More... | |
size_t | tot_orgs |
How many organisms have ever existed of this group? More... | |
size_t | num_offspring |
How many direct offspring groups exist from this one. More... | |
size_t | total_offspring |
How many total extant offspring taxa exist from this one (i.e. including indirect) More... | |
size_t | depth |
How deep in tree is this node? (Root is 0) More... | |
double | origination_time |
When did this taxon first appear in the population? More... | |
DATA_STRUCT | data |
A struct for storing additional information about this taxon. More... | |
A Taxon represents a type of organism in a phylogeny.
ORG_INFO | The information type associated with an organism, used to categorize it. |
Genotypes are the most commonly used Taxon; in general taxa can be anything from a shared genome sequence, a phenotypic trait, or a even a position in the world (if you want to track an evolutionary pathway)
using emp::Taxon< ORG_INFO, DATA_STRUCT >::data_t = DATA_STRUCT |
|
protected |
|
protected |
|
inline |
|
delete |
|
default |
|
inline |
Add a new offspring Taxon to this one.
|
inline |
Add a new organism to this Taxon.
|
inline |
Recursively increment total offspring count for this and all ancestors.
|
inline |
|
inline |
|
inline |
Get the number of taxanomic steps since the ancestral organism was injected into the World.
|
inline |
Get a unique ID for this taxon; IDs are assigned sequentially, so newer taxa have higher IDs.
|
inline |
Retrieve the tracked info associated with this Taxon.
|
inline |
Get the number of taxa that were produced by organisms from this Taxon.
|
inline |
Get the number of living organisms currently associated with this Taxon.
|
inline |
|
inline |
Retrieve a pointer to the parent Taxon.
|
inline |
Get total number of offspring directly or indirectly descending from this taxon.
|
inline |
Get the total number of organisms that have ever lived associated with this Taxon.
|
delete |
|
default |
|
inline |
Remove and offspring taxa after its entire sub-tree has died out (pruning)
|
inline |
Remove an organism from this Taxon (after it dies). Removals must return true if the taxon needs to continue; false if it should deactivate.
|
inline |
Reduce the total count of extant offspring and recursively do so for all ancestors (gets called on a taxon's parent when that taxon goes extinct)
|
inline |
|
protected |
A struct for storing additional information about this taxon.
|
protected |
How deep in tree is this node? (Root is 0)
|
protected |
ID for this Taxon (Unique within this Systematics)
|
protected |
Details for the organims associated within this taxanomic group.
|
protected |
How many direct offspring groups exist from this one.
|
protected |
How many organisms currently exist of this group?
|
protected |
When did this taxon first appear in the population?
|
protected |
Pointer to parent group (nullptr if injected)
|
protected |
How many organisms have ever existed of this group?
|
protected |
How many total extant offspring taxa exist from this one (i.e. including indirect)