Empirical
Public Types | Public Member Functions | Protected Types | Protected Attributes | List of all members
emp::Taxon< ORG_INFO, DATA_STRUCT > Class Template Reference

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
 
Taxonoperator= (const Taxon &)=delete
 
Taxonoperator= (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_tGetInfo () const
 Retrieve the tracked info associated with this Taxon. More...
 
Ptr< this_tGetParent () 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_tGetData ()
 
const data_tGetData () 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_tparent
 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...
 

Detailed Description

template<typename ORG_INFO, typename DATA_STRUCT = emp::datastruct::no_data>
class emp::Taxon< ORG_INFO, DATA_STRUCT >

A Taxon represents a type of organism in a phylogeny.

Parameters
ORG_INFOThe 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)

Member Typedef Documentation

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
using emp::Taxon< ORG_INFO, DATA_STRUCT >::data_t = DATA_STRUCT
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
using emp::Taxon< ORG_INFO, DATA_STRUCT >::info_t = ORG_INFO
protected
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
using emp::Taxon< ORG_INFO, DATA_STRUCT >::this_t = Taxon<ORG_INFO, DATA_STRUCT>
protected

Constructor & Destructor Documentation

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
emp::Taxon< ORG_INFO, DATA_STRUCT >::Taxon ( size_t  _id,
const info_t _info,
Ptr< this_t _parent = nullptr 
)
inline
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
emp::Taxon< ORG_INFO, DATA_STRUCT >::Taxon ( const Taxon< ORG_INFO, DATA_STRUCT > &  )
delete
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
emp::Taxon< ORG_INFO, DATA_STRUCT >::Taxon ( Taxon< ORG_INFO, DATA_STRUCT > &&  )
default

Member Function Documentation

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
void emp::Taxon< ORG_INFO, DATA_STRUCT >::AddOffspring ( )
inline

Add a new offspring Taxon to this one.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
void emp::Taxon< ORG_INFO, DATA_STRUCT >::AddOrg ( )
inline

Add a new organism to this Taxon.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
void emp::Taxon< ORG_INFO, DATA_STRUCT >::AddTotalOffspring ( )
inline

Recursively increment total offspring count for this and all ancestors.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
data_t& emp::Taxon< ORG_INFO, DATA_STRUCT >::GetData ( )
inline
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
const data_t& emp::Taxon< ORG_INFO, DATA_STRUCT >::GetData ( ) const
inline
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::GetDepth ( ) const
inline

Get the number of taxanomic steps since the ancestral organism was injected into the World.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::GetID ( ) const
inline

Get a unique ID for this taxon; IDs are assigned sequentially, so newer taxa have higher IDs.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
const info_t& emp::Taxon< ORG_INFO, DATA_STRUCT >::GetInfo ( ) const
inline

Retrieve the tracked info associated with this Taxon.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::GetNumOff ( ) const
inline

Get the number of taxa that were produced by organisms from this Taxon.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::GetNumOrgs ( ) const
inline

Get the number of living organisms currently associated with this Taxon.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
double emp::Taxon< ORG_INFO, DATA_STRUCT >::GetOriginationTime ( ) const
inline
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
Ptr<this_t> emp::Taxon< ORG_INFO, DATA_STRUCT >::GetParent ( ) const
inline

Retrieve a pointer to the parent Taxon.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
int emp::Taxon< ORG_INFO, DATA_STRUCT >::GetTotalOffspring ( )
inline

Get total number of offspring directly or indirectly descending from this taxon.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::GetTotOrgs ( ) const
inline

Get the total number of organisms that have ever lived associated with this Taxon.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
Taxon& emp::Taxon< ORG_INFO, DATA_STRUCT >::operator= ( const Taxon< ORG_INFO, DATA_STRUCT > &  )
delete
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
Taxon& emp::Taxon< ORG_INFO, DATA_STRUCT >::operator= ( Taxon< ORG_INFO, DATA_STRUCT > &&  )
default
template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
bool emp::Taxon< ORG_INFO, DATA_STRUCT >::RemoveOffspring ( )
inline

Remove and offspring taxa after its entire sub-tree has died out (pruning)

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
bool emp::Taxon< ORG_INFO, DATA_STRUCT >::RemoveOrg ( )
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.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
void emp::Taxon< ORG_INFO, DATA_STRUCT >::RemoveTotalOffspring ( )
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)

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
void emp::Taxon< ORG_INFO, DATA_STRUCT >::SetOriginationTime ( double  time)
inline

Member Data Documentation

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
DATA_STRUCT emp::Taxon< ORG_INFO, DATA_STRUCT >::data
protected

A struct for storing additional information about this taxon.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::depth
protected

How deep in tree is this node? (Root is 0)

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::id
protected

ID for this Taxon (Unique within this Systematics)

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
const info_t emp::Taxon< ORG_INFO, DATA_STRUCT >::info
protected

Details for the organims associated within this taxanomic group.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::num_offspring
protected

How many direct offspring groups exist from this one.

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::num_orgs
protected

How many organisms currently exist of this group?

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
double emp::Taxon< ORG_INFO, DATA_STRUCT >::origination_time
protected

When did this taxon first appear in the population?

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
Ptr<this_t> emp::Taxon< ORG_INFO, DATA_STRUCT >::parent
protected

Pointer to parent group (nullptr if injected)

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::tot_orgs
protected

How many organisms have ever existed of this group?

template<typename ORG_INFO , typename DATA_STRUCT = emp::datastruct::no_data>
size_t emp::Taxon< ORG_INFO, DATA_STRUCT >::total_offspring
protected

How many total extant offspring taxa exist from this one (i.e. including indirect)


The documentation for this class was generated from the following file: