Phage Class Documentation
-
class Phage : public Symbiont
Public Functions
-
inline Phage(emp::Ptr<emp::Random> _random, emp::Ptr<LysisWorld> _world, emp::Ptr<SymConfigLysis> _config, double _intval = 0.0, double _points = 0.0)
The constructor for phage
-
Phage(const Phage&) = default
Input: None
Output: None
Purpose: To force a copy constructor to be generated by the compiler.
-
Phage(Phage&&) = default
Input: None
Output: None
Purpose: To force a move constructor to be generated by the compiler
-
Phage() = 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, Phage
Purpose: To know which subclass the object is
-
inline double GetBurstTimer()
Input: None
Output: The double representing the phage’s burst timer.
Purpose: To get a phage’s burst timer.
-
inline void IncBurstTimer()
Input: None
Output: None
Purpose: To increment a phage’s burst timer.
-
inline void SetBurstTimer(double _in)
Input: The double to be set as the phage’s burst timer
Output: None
Purpose: To set a phage’s burst timer.
-
inline double GetLysisChance()
Input: None
Output: The double representing a phage’s change of lysis.
Purpose: To determine a phage’s chance of lysis.
-
inline void SetLysisChance(double _in)
Input: The double to be set as the phage’s chance of lysis.
Output: None
Purpose: To set a phage’s chance of lysis
-
inline double GetIncVal()
Input: None
Output: The double representing a phage’s incorporation value.
Purpose: To determine a phage’s incorporation value.
-
inline void SetIncVal(double _in)
Input: The double to be set as the phage’s incorporation value.
Output: None
Purpose: To set a phage’s incorporation value.
-
inline double GetInductionChance()
Input: None
Output: The double representing a prophage’s chance of induction.
Purpose: To determine a lysogenic phage’s chance of inducing
-
inline void SetInductionChance(double _in)
Input: The double to be set as the phage’s chance of induction
Output:None
Purpose: To set a phage’s chance of inducing
-
inline bool GetLysogeny()
Input: None
Output: The bool representing if a phage will do lysogeny.
Purpose: To determine if a phage is capable of lysogeny
-
inline bool IsPhage()
Input: None
Output: The bool representing if an organism is a phage, always true.
Purpose: To determine if an organism is a phage.
-
inline void UponInjection()
Input: None
Output: None
Purpose: To determine if a phage will choose lysis or lysogeny. If a phage chooses to be lytic, their interaction value will be -1 to represent them being antagonistic. If a phage chooses to be lysogenic, their interaction value will be 0 to represent them being neutral.
-
inline void Mutate()
Input: None
Output: None
Purpose: To mutate a phage’s chance of lysis. 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. Phage mutation can be on or off.
-
inline emp::Ptr<Organism> MakeNew()
Input: None
Output: The pointer to the newly created organism
Purpose: To produce a new symbiont, identical to the original
-
inline void LysisBurst(emp::WorldPosition location)
Input: location of the phage attempting to horizontally transmit
Output: None
Purpose: To burst host and release offspring
-
inline void LysisStep()
Input: None
Output: None
Purpose: To allow lytic phage to produce offspring and increment the burst timer
-
inline std::optional<emp::Ptr<Organism>> VerticalTransmission(emp::Ptr<Organism> host_baby)
Input: A pointer to the baby host to have symbionts added.
Output: None
Purpose: To allow for vertical transmission to occur. lysogenic phage have 100% chance of vertical transmission, lytic phage have 0% chance
-
inline double ProcessResources(double host_donation, emp::Ptr<Organism> host = nullptr)
Input: The double representing the resources to be distributed to the phage and (optionally) the host from whom it comes; if no host is provided, the phage’s host variable is used.
Output: The double representing the resources that are left over from what was distributed to the phage.
Purpose: To allow a phage to steal or use donated resources from their host.
-
inline void Process(emp::WorldPosition location)
Input: The worldposition representing the location of the phage being processed.
Output: None
Purpose: To process a phage, meaning check for reproduction, check for lysis, and move the phage.
-
inline Phage(emp::Ptr<emp::Random> _random, emp::Ptr<LysisWorld> _world, emp::Ptr<SymConfigLysis> _config, double _intval = 0.0, double _points = 0.0)