Skip to content

Class Tool

template <typename TSeq>

ClassList > Tool

Tools for defending the agent against the virus. More...

  • #include <tool-bones.hpp>

Inherited by the following classes: ToolImmunoglobulin, ToolVaccine

Public Functions

Type Name
EPI_TYPENAME_TRAITS (TSeq, int)
Tool ()
Tool (std::string name="unknown tool")
Tool (std::string name, epiworld_double prevalence, bool as_proportion)
virtual std::unique_ptr< Tool< TSeq > > clone_ptr () const
void distribute (Model< TSeq > * model)
Agent< TSeq > * get_agent ()
int get_date () const
virtual epiworld_double get_death_reduction (VirusPtr< TSeq > & v, Model< TSeq > * model)
int get_id () const
virtual std::string get_name () const
void get_queue (epiworld_fast_int * init, epiworld_fast_int * post)
virtual epiworld_double get_recovery_enhancer (VirusPtr< TSeq > & v, Model< TSeq > * model)
void get_state (epiworld_fast_int * init, epiworld_fast_int * post)
virtual epiworld_double get_susceptibility_reduction (VirusPtr< TSeq > & v, Model< TSeq > * model)
virtual epiworld_double get_transmission_reduction (VirusPtr< TSeq > & v, Model< TSeq > * model)
bool operator!= (const Tool< TSeq > & other) const
bool operator== (const Tool< TSeq > & other) const
bool operator== (const Tool< std::vector< int > > & other) const
void print () const
void set_date (int d)
virtual void set_death_reduction (std::string param)
virtual void set_death_reduction (epiworld_double * prob) = delete
virtual void set_death_reduction (epiworld_double prob)
virtual void set_death_reduction_fun (ToolFun< TSeq > fun)
void set_distribution (ToolToAgentFun< TSeq > fun)
void set_id (int id)
void set_name (std::string name)
void set_queue (epiworld_fast_int init, epiworld_fast_int post)
virtual void set_recovery_enhancer (std::string param)
virtual void set_recovery_enhancer (epiworld_double * prob) = delete
virtual void set_recovery_enhancer (epiworld_double prob)
virtual void set_recovery_enhancer_fun (ToolFun< TSeq > fun)
void set_sequence (TSeq d)
void set_sequence (std::shared_ptr< TSeq > d)
void set_sequence (int d)
void set_state (epiworld_fast_int init, epiworld_fast_int post)
virtual void set_susceptibility_reduction (std::string param)
virtual void set_susceptibility_reduction (epiworld_double * prob) = delete
virtual void set_susceptibility_reduction (epiworld_double prob)
virtual void set_susceptibility_reduction_fun (ToolFun< TSeq > fun)
virtual void set_transmission_reduction (std::string param)
virtual void set_transmission_reduction (epiworld_double * prob) = delete
virtual void set_transmission_reduction (epiworld_double prob)
virtual void set_transmission_reduction_fun (ToolFun< TSeq > fun)
virtual ~Tool () = default

Protected Attributes

Type Name
Agent< TSeq > * agent = nullptr
int date = -99
ToolFun< TSeq > death_reduction = nullptr
ToolToAgentFun< TSeq > dist = nullptr
int id = -99
int pos_in_agent = -99
Location in the agent.
epiworld_fast_int queue_init = [**Queue**](classQueue.md)&lt;TSeq&gt;::NoOne
Change of state when added to agent.
epiworld_fast_int queue_post = [**Queue**](classQueue.md)&lt;TSeq&gt;::NoOne
Change of state when removed from agent.
ToolFun< TSeq > recovery_enhancer = nullptr
epiworld_fast_int state_init = -99
epiworld_fast_int state_post = -99
ToolFun< TSeq > susceptibility_reduction = nullptr
std::string tool_name
ToolFun< TSeq > transmission_reduction = nullptr

Protected Functions

Type Name
EPI_TYPENAME_TRAITS (TSeq, int)
Sequence of the tool.
void set_agent (Agent< TSeq > * p, size_t idx)

Detailed Description

Template parameters:

  • TSeq Type of sequence

Public Functions Documentation

function EPI_TYPENAME_TRAITS [2/2]

Tool::EPI_TYPENAME_TRAITS (
    TSeq,
    int
) 

function Tool [1/3]

inline Tool::Tool () 

function Tool [2/3]

inline Tool::Tool (
    std::string name="unknown tool"
) 

function Tool [3/3]

inline Tool::Tool (
    std::string name,
    epiworld_double prevalence,
    bool as_proportion
) 

function clone_ptr

inline virtual std::unique_ptr< Tool < TSeq > > Tool::clone_ptr () const

function distribute

inline void Tool::distribute (
    Model < TSeq > * model
) 

function get_agent

inline Agent < TSeq > * Tool::get_agent () 

function get_date

inline int Tool::get_date () const

function get_death_reduction

inline virtual epiworld_double Tool::get_death_reduction (
    VirusPtr < TSeq > & v,
    Model < TSeq > * model
) 

function get_id

inline int Tool::get_id () const

function get_name

inline virtual std::string Tool::get_name () const

function get_queue

inline void Tool::get_queue (
    epiworld_fast_int * init,
    epiworld_fast_int * post
) 

function get_recovery_enhancer

inline virtual epiworld_double Tool::get_recovery_enhancer (
    VirusPtr < TSeq > & v,
    Model < TSeq > * model
) 

function get_state

inline void Tool::get_state (
    epiworld_fast_int * init,
    epiworld_fast_int * post
) 

function get_susceptibility_reduction

inline virtual epiworld_double Tool::get_susceptibility_reduction (
    VirusPtr < TSeq > & v,
    Model < TSeq > * model
) 

function get_transmission_reduction

inline virtual epiworld_double Tool::get_transmission_reduction (
    VirusPtr < TSeq > & v,
    Model < TSeq > * model
) 

function operator!=

inline bool Tool::operator!= (
    const Tool < TSeq > & other
) const

function operator==

inline bool Tool::operator== (
    const Tool < TSeq > & other
) const

function operator==

inline bool Tool::operator== (
    const Tool < std::vector< int > > & other
) const

function print

inline void Tool::print () const

function set_date

inline void Tool::set_date (
    int d
) 

function set_death_reduction [1/3]

inline virtual void Tool::set_death_reduction (
    std::string param
) 

function set_death_reduction [2/3]

virtual void Tool::set_death_reduction (
    epiworld_double * prob
) = delete

function set_death_reduction [3/3]

inline virtual void Tool::set_death_reduction (
    epiworld_double prob
) 

function set_death_reduction_fun

inline virtual void Tool::set_death_reduction_fun (
    ToolFun < TSeq > fun
) 

function set_distribution

inline void Tool::set_distribution (
    ToolToAgentFun < TSeq > fun
) 

function set_id

inline void Tool::set_id (
    int id
) 

function set_name

inline void Tool::set_name (
    std::string name
) 

function set_queue

inline void Tool::set_queue (
    epiworld_fast_int init,
    epiworld_fast_int post
) 

function set_recovery_enhancer [1/3]

inline virtual void Tool::set_recovery_enhancer (
    std::string param
) 

function set_recovery_enhancer [2/3]

virtual void Tool::set_recovery_enhancer (
    epiworld_double * prob
) = delete

function set_recovery_enhancer [3/3]

inline virtual void Tool::set_recovery_enhancer (
    epiworld_double prob
) 

function set_recovery_enhancer_fun

inline virtual void Tool::set_recovery_enhancer_fun (
    ToolFun < TSeq > fun
) 

function set_sequence [1/3]

inline void Tool::set_sequence (
    TSeq d
) 

function set_sequence [2/3]

inline void Tool::set_sequence (
    std::shared_ptr< TSeq > d
) 

function set_sequence [3/3]

inline void Tool::set_sequence (
    int d
) 

function set_state

inline void Tool::set_state (
    epiworld_fast_int init,
    epiworld_fast_int post
) 

function set_susceptibility_reduction [1/3]

inline virtual void Tool::set_susceptibility_reduction (
    std::string param
) 

function set_susceptibility_reduction [2/3]

virtual void Tool::set_susceptibility_reduction (
    epiworld_double * prob
) = delete

function set_susceptibility_reduction [3/3]

inline virtual void Tool::set_susceptibility_reduction (
    epiworld_double prob
) 

function set_susceptibility_reduction_fun

inline virtual void Tool::set_susceptibility_reduction_fun (
    ToolFun < TSeq > fun
) 

function set_transmission_reduction [1/3]

inline virtual void Tool::set_transmission_reduction (
    std::string param
) 

function set_transmission_reduction [2/3]

virtual void Tool::set_transmission_reduction (
    epiworld_double * prob
) = delete

function set_transmission_reduction [3/3]

inline virtual void Tool::set_transmission_reduction (
    epiworld_double prob
) 

function set_transmission_reduction_fun

inline virtual void Tool::set_transmission_reduction_fun (
    ToolFun < TSeq > fun
) 

function ~Tool

virtual Tool::~Tool () = default

Protected Attributes Documentation

variable agent

Agent<TSeq>* Tool< TSeq >::agent;

variable date

int Tool< TSeq >::date;

variable death_reduction

ToolFun<TSeq> Tool< TSeq >::death_reduction;

variable dist

ToolToAgentFun<TSeq> Tool< TSeq >::dist;

variable id

int Tool< TSeq >::id;

variable pos_in_agent

Location in the agent.

int Tool< TSeq >::pos_in_agent;


variable queue_init

Change of state when added to agent.

epiworld_fast_int Tool< TSeq >::queue_init;


variable queue_post

Change of state when removed from agent.

epiworld_fast_int Tool< TSeq >::queue_post;


variable recovery_enhancer

ToolFun<TSeq> Tool< TSeq >::recovery_enhancer;

variable state_init

epiworld_fast_int Tool< TSeq >::state_init;

variable state_post

epiworld_fast_int Tool< TSeq >::state_post;

variable susceptibility_reduction

ToolFun<TSeq> Tool< TSeq >::susceptibility_reduction;

variable tool_name

std::string Tool< TSeq >::tool_name;

variable transmission_reduction

ToolFun<TSeq> Tool< TSeq >::transmission_reduction;

Protected Functions Documentation

function EPI_TYPENAME_TRAITS [1/2]

Sequence of the tool.

Tool::EPI_TYPENAME_TRAITS (
    TSeq,
    int
) 


function set_agent

inline void Tool::set_agent (
    Agent < TSeq > * p,
    size_t idx
) 


The documentation for this class was generated from the following file epiworld-src/include/epiworld/tool-bones.hpp