PGGHost Class Documentation

class PGGHost : public Host

Public Functions

PGGHost(const PGGHost&) = default

Input: None

Output: None

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

PGGHost(PGGHost&&) = default

Input: None

Output: None

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

PGGHost() = default

Input: None

Output: None

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

inline std::string const GetName()

Input: None

Output: Name of class as string, PGGHost

Purpose: To know which subclass the object is

inline double GetPool()

Input: None

Output: The double representing the resource pool.

Purpose: To return the double representing the resource pool.

inline void SetPool(double _in)

Input: A double to be set as the resource pool.

Output: None

Purpose: To set the number of resources in the resource pool.

inline void AddPool(double _in)

Input: A double to be added to the resource pool.

Output: None

Purpose: To add resources into the host’s resource pool.

inline void DistribResources(double resources)

Input: A double quantity of resources to be distributed.

Output: None

Purpose: To distribute resources to symbionts and collect resource donations from them.

inline void DistribPool()

Input: None

Output: None

Purpose: To distribute the resource pool across the hosted symbionts, each donation multiplied by PGG synergy, and then set the resource pool to 0.

inline emp::Ptr<Organism> MakeNew()

Input: None

Output: A new PGGHost with same properties as this PGGHost.

Purpose: To avoid creating an organism via constructor in other methods.