tekka
pbf::Individual Class Reference

Component of SubPopulation. More...

#include <individual.hpp>

Public Member Functions

 Individual ()=default
 The origin without parents for Population initialization.
 
 Individual (std::shared_ptr< Individual > father, std::shared_ptr< Individual > mother, int_fast32_t year) noexcept
 for sexual reproduction
 
 Individual (const Individual &)=delete
 
 Individual (Individual &&)=delete
 
void trace_back (std::ostream &ost, std::unordered_map< const Individual *, uint_fast32_t > &ids, uint_fast32_t loc, int_fast32_t year) const
 Write ancestors recursively.
 
std::ostream & write (std::ostream &) const
 Write all the data members in TSV.
 
std::ostream & write (std::ostream &, const std::unordered_map< const Individual *, uint_fast32_t > &) const
 Write all the data members in TSV with translated IDs.
 
int_fast32_t age (const int_fast32_t year) const noexcept
 Age in the given year.
 

Static Public Member Functions

static std::ostream & write_trace_back_header (std::ostream &)
 Write column names for trace_back()
 
static std::ostream & write_names (std::ostream &)
 Write column names for write()
 

Private Attributes

const std::shared_ptr< Individualfather_ {nullptr}
 Pointer to father.
 
const std::shared_ptr< Individualmother_ {nullptr}
 Pointer to mother.
 
int_fast32_t birth_year_ {-4}
 Year of birth.
 

Friends

std::ostream & operator<< (std::ostream &ost, const Individual &x)
 Shortcut of Individual::write.
 

Detailed Description

Component of SubPopulation.


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