Simulating Mating Alliances as a Reproductive Tactic for Populations
 All Classes Functions Variables Friends
Public Member Functions | Protected Attributes | Friends | List of all members
Human Class Reference
Inheritance diagram for Human:
Humanmt Humandna

Public Member Functions

 Human (int, int)
 
 Human (int pIdMother, int pIdFather, int, int)
 
 Human (Human const &)
 
virtual ~Human ()
 
Humanoperator= (Human const &)
 
bool shared_parents (Human const &)
 
void reborn (int newMother, int newFather)
 
void reborn (Human const &)
 
void reset ()
 
int getMother () const
 
int getFather () const
 
int getNbMate () const
 
int getNbChild () const
 
void hadChild (int n)
 
void newMate ()
 

Protected Attributes

int idFather
 
int idMother
 
int nbChild
 
int nbMate
 

Friends

std::ostream & operator<< (std::ostream &, Human const &)
 

Constructor & Destructor Documentation

Human::Human ( int  a,
int  b 
)

Constructor from size of mtDNA (unused) and size of dna sequence (unused).

Human::Human ( int  pIdMother,
int  pIdFather,
int  a,
int  b 
)

Constructor from the parents ID and the size of mtDNA (unused) and size of dna sequence (unused).

Human::Human (Human const &) ( )
virtual

Copy constructor.

Human::~Human ( )
virtual

Destructor.

Member Function Documentation

int Human::getFather ( ) const

Returns father ID.

int Human::getMother ( ) const

Returns Mother ID.

int Human::getNbChild ( ) const

Returns the number this Human have generated.

int Human::getNbMate ( ) const

Returns the number of mates this human had children with.

void Human::hadChild ( int  n)

Increases the number of children for this Human by n.

void Human::newMate ( )

Increases the number of mate by one.

Human & Human::operator= ( Human const &  a)

Assignment operator.

void Human::reborn ( int  newMother,
int  newFather 
)

Make a new instance out of an old one just changing its attributes.

void Human::reborn ( Human const &  a)

Make a new instance out of an old one just changing its attributes.

void Human::reset ( )

Function to reset the value of all the attributes.

void Human::shared_parents (Human const &) ( )

Function that returns whether the two humans share at least one parent.

Member Data Documentation

int Human::idFather
protected

ID of the father.

int Human::idMother
protected

ID of the mother.

int Human::nbChild
protected

Number of children.

int Human::nbMate
protected

Number of mates with who the Human had children.


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

SMARTPOP home