Class EfficientSymbiont

Inheritance Relationships

Base Type

Class Documentation

class EfficientSymbiont : public Symbiont

Public Functions

EfficientSymbiont(emp::Ptr<emp::Random> _random, emp::Ptr<EfficientWorld> _world, emp::Ptr<SymConfigBase> _config, double _intval = 0.0, double _points = 0.0, double _efficient = 0.1)

The constructor for efficient symbiont

EfficientSymbiont(const EfficientSymbiont&) = default

Input: None

Output: None

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

EfficientSymbiont(EfficientSymbiont&&) = default

Input: None

Output: None

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

EfficientSymbiont() = default

Input: None

Output: None

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

std::string const GetName()

Input: None

Output: Name of class as string, EfficientSymbiont

Purpose: To know which subclass the object is

void SetEfficiency(double _in)

Input: Efficiency value

Output: None

Purpose: Setting an efficient symbiont’s efficiency value.

double GetEfficiency()

Input: None

Output: A double representing the symbiont’s efficiency.

Purpose: Getting an efficient symbiont’s efficiency value.

void AddPoints(double _in)

Input: A double representing the amount to be incremented to a symbiont’s points.

Output: None

Purpose: Incrementing an efficient symbiont’s points. The points are adjusted by the efficiency of the symbiont.

void Mutate(std::string mode)

Input: String indicating mode, either “vertical” or “horizontal”

Output: None

Purpose: Mutating the efficiency of an efficient symbiont based upon the config setting for mutation size.

emp::Ptr<Organism> MakeNew()

Input: None.

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

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

emp::Ptr<Organism> Reproduce(std::string mode)

Input: String to indicate the mode of transmission, either vertical or horizontal

Output: The pointer to the newly created organism

Purpose: To produce a new symbiont

void VerticalTransmission(emp::Ptr<Organism> host_baby)

Input: The pointer to the organism that is the new host baby

Output: None

Purpose: To allow for vertical transmission to occur

void HorizontalTransmission(emp::WorldPosition location)

Input: The location of the organism as a WorldPosition

Output: None

Purpose: To check and allow for horizontal transmission to occur

Protected Attributes

double efficiency

Purpose: Represents the efficiency of a symbiont. This has a multiplicable impact on a symbiont’s resource collection.

double ht_mut_size = 0.002

Purpose: Represents the standard deviation of the values chosen as mutations of a symbiont’s interaction value when horizontal transmission is occuring. .

double ht_mut_rate = 0

Purpose: Represents the probability (0-1) of mutation occurring during horizontal transmission.

double eff_mut_rate = 0

Purpose: Represents the probability (0-1) of mutation occurring during horizontal transmission for the efficiency trait.

emp::Ptr<EfficientWorld> my_world = NULL

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