Class PGGSymbiont

Inheritance Relationships

Base Type

Class Documentation

class PGGSymbiont : public Symbiont

Public Functions

PGGSymbiont(emp::Ptr<emp::Random> _random, emp::Ptr<PGGWorld> _world, emp::Ptr<SymConfigBase> _config, double _intval = 0.0, double _donation = 0.0, double _points = 0.0)
PGGSymbiont(const PGGSymbiont&) = default

Input: None

Output: None

Purpose: To force a copy constructor to be generated by the compiler.

PGGSymbiont(PGGSymbiont&&) = default

Input: None

Output: None

Purpose: To force a move constructor to be generated by the compiler

PGGSymbiont() = default

Input: None

Output: None

Purpose: To tell the compiler to use its default generated variants of the constructor

PGGSymbiont &operator=(const PGGSymbiont&) = default

Input: None

Output: None

Purpose: To force a copy assignment operator to be generated by the compiler.

PGGSymbiont &operator=(PGGSymbiont&&) = default

Input: None

Output: None

Purpose: To force a move assignment operator to be generated by the compiler.

std::string const GetName()

Input: None

Output: Name of class as string, PGGSymbiont

Purpose: To know which subclass the object is

double GetDonation()

Input: None

Output: The donation value for the symbiont.

Purpose: To get a symbiont’s donation value.

void SetDonation(double _in)

Input: The double to be set as the symbiont’s donation value.

Output: None

Purpose: To set the symbiont’s donation value.

void Mutate()

Input: None

Output: None

Purpose: To mutate a PGGSymbiont’s donation value. The mutation will be based on a value chosen from a normal distribution centered at 0, with a standard deviation that is equal to the mutation size.

double ProcessPool()

Input: None

Output: The double representation of resources to be given to the host.

Purpose: Deteremines the resources that the symbiont is contributing to the host’s resource pool, and decriments them from the symbiont’s own own resource collection.

emp::Ptr<Organism> MakeNew()

Input: None

Output: The pointer to the newly created organism

Purpose: To produce a new PGGSymbiont, identical to the original

std::string PrintSym(emp::Ptr<PGGSymbiont> org)

Input: The PGG symbiont to be printed

Output: A formatted string representation of the input symbiont, including its interaction value and donation value.

Purpose: To print the symbiont for testing purposes.

Protected Attributes

double PGG_donate = 0

Purpose: the donation value for this symbiont.

emp::Ptr<PGGWorld> my_world = NULL

Purpose: Represents the world that the pgg symbionts are living in.