File entity-distribute-meat.hpp¶
FileList > epiworld > entity-distribute-meat.hpp
Go to the source code of this file
Public Functions¶
| Type | Name |
|---|---|
| EntityToAgentFun< TSeq > | distribute_entity_randomly (epiworld_double prevalence, bool as_proportion, bool to_unassigned) |
| EntityToAgentFun< TSeq > | distribute_entity_to_range (int from, int to, bool to_unassigned=false) |
| EntityToAgentFun< TSeq > | distribute_entity_to_set (std::vector< size_t > & idx) |
Public Functions Documentation¶
function distribute_entity_randomly¶
template<typename TSeq>
inline EntityToAgentFun < TSeq > distribute_entity_randomly (
epiworld_double prevalence,
bool as_proportion,
bool to_unassigned
)
Distributes an entity to unassigned agents in the model.
Parameters:
prevalenceThe proportion of agents to distribute the entity to.as_proportionFlag indicating whether the prevalence is a proportionto_unassignedFlag indicating whether to distribute the entity only to unassigned agents.
Returns:
An EntityToAgentFun object that distributes the entity to unassigned agents.
function distribute_entity_to_range¶
template<typename TSeq>
inline EntityToAgentFun < TSeq > distribute_entity_to_range (
int from,
int to,
bool to_unassigned=false
)
Distributes an entity to a range of agents.
Parameters:
fromThe starting index of the range.toThe ending index of the range.to_unassignedFlag indicating whether to distribute the entity only to unassigned agents.
Returns:
A lambda function that distributes the entity to the specified range of agents.
function distribute_entity_to_set¶
template<typename TSeq>
inline EntityToAgentFun < TSeq > distribute_entity_to_set (
std::vector< size_t > & idx
)
The documentation for this class was generated from the following file epiworld-src/include/epiworld/entity-distribute-meat.hpp