Class random_distributor
Defined in File random_distributor.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Types
public rer::client< random_distributor >
public cosm::foraging::block_dist::base_distributor
(Class base_distributor)
Class Documentation
-
class random_distributor : public rer::client<random_distributor>, public cosm::foraging::block_dist::base_distributor
Distributes a set of blocks randomly within a specified 2D area, such that no blocks overlap with each other or other entities already present in the arena (nest, cache, etc.).
Public Functions
-
random_distributor(const cads::arena_grid::view &area, cads::arena_grid *arena_grid, const cspatial::conflict_checker::map_cb_type &conflict_check, const dist_success_cb_type &dist_success, rmath::rng *rng)
-
inline virtual cfds::block3D_cluster_vectorno block_clustersno(void) override
-
inline size_t capacity(void) const override
-
inline void coord_search_policy(coord_search_policy policy)
-
virtual dist_status distribute_block(crepr::sim_block3D *block) override
Distribution a single block in the arena.
Note
Holding arena_map block, grid mutexes necessary to safely call this function in multithreaded contexts (not handled internally).
- Parameters:
block – The block to distribute.
- Returns:
TRUE
if the distribution was successful,FALSE
otherwise.
-
inline size_t n_configured_clusters(void) const override
-
inline size_t n_mapped_clusters(void) const override
-
random_distributor &operator=(const random_distributor&) = delete
-
inline size_t size(void) const override
-
random_distributor(const cads::arena_grid::view &area, cads::arena_grid *arena_grid, const cspatial::conflict_checker::map_cb_type &conflict_check, const dist_success_cb_type &dist_success, rmath::rng *rng)