Class powerlaw_distributor
Defined in File powerlaw_distributor.hpp
Inheritance Relationships
Base Types
public rer::client< powerlaw_distributor >
public cosm::foraging::block_dist::base_distributor
(Class base_distributor)
Class Documentation
-
class powerlaw_distributor : public rer::client<powerlaw_distributor>, public cosm::foraging::block_dist::base_distributor
Distributes a block, or set of blocks, within the arena as randomly placed clusters with sizes ranging [minsize, maxsize], with a power law based stride of 2^x between.
Blocks are assumed to be the same size as arena resolution (this is not checked).
Public Functions
-
powerlaw_distributor(const config::powerlaw_dist_config *config, cads::arena_grid *arena_grid, rmath::rng *rng)
-
powerlaw_distributor(const powerlaw_distributor&) = delete
-
virtual cfds::block3D_cluster_vectorno block_clustersno(void) override
-
size_t capacity(void) const override
-
virtual dist_status distribute_block(crepr::sim_block3D *block) override
Distribute a block in the specified area by trying each random distributor in turn.
- Parameters:
block – The block to distribute.
- Returns:
TRUE
if the block distribution was successful,FALSE
otherwise.
-
void initialize(carena::base_arena_map *map, const cds::const_spatial_entity_vector &c_entities, const rmath::vector3d &c_block_bb, const cspatial::conflict_checker::map_cb_type &conflict_check, const base_distributor::dist_success_cb_type &dist_success)
Computer cluster locations such that no two clusters overlap, and map locations and compositional block distributors into internal data structures.
- Parameters:
c_block_bb – The bounding box large enough to hold any block which might be distributed in the arena.
-
inline size_t n_configured_clusters(void) const override
-
inline size_t n_mapped_clusters(void) const override
-
powerlaw_distributor &operator=(const powerlaw_distributor&) = delete
-
size_t size(void) const override