Skip to content

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:

  • prevalence The proportion of agents to distribute the entity to.
  • as_proportion Flag indicating whether the prevalence is a proportion
  • to_unassigned Flag 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:

  • from The starting index of the range.
  • to The ending index of the range.
  • to_unassigned Flag 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