Class cluster_distributor
Defined in File cluster_distributor.hpp
Inheritance Relationships
Base Types
public rer::client< cluster_distributor >
public cosm::foraging::block_dist::base_distributor
(Class base_distributor)
Class Documentation
-
class cluster_distributor : public rer::client<cluster_distributor>, public cosm::foraging::block_dist::base_distributor
Distributes a block or set of blocks within the specified cluster bounds randomly, using random_distributor.
Public Functions
-
cluster_distributor(const rtypes::type_uuid &id, const cads::arena_grid::view &view, cads::arena_grid *arena_grid, const cspatial::conflict_checker::map_cb_type &conflict_check, const base_distributor::dist_success_cb_type &dist_success, size_t capacity, rmath::rng *rng)
-
~cluster_distributor(void) override = default
-
virtual cfds::block3D_cluster_vectorno block_clustersno(void) override
-
inline size_t capacity(void) const override
-
inline void coord_search_policy(const coord_search_policy &policy)
-
inline rmath::vector2z danchor2D(void) const
-
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.
-
virtual dist_status distribute_blocks(cds::block3D_vectorno &blocks, bool strict_success) override
Calls distribute_block() on each block.
- Returns:
TRUE
iff all block distributions were successful,FALSE
otherwise.
-
inline size_t n_configured_clusters(void) const override
-
inline size_t n_mapped_clusters(void) const override
-
cluster_distributor &operator=(const cluster_distributor&) = delete
-
inline rmath::vector2d ranchor2D(void) const
-
inline size_t size(void) const override
-
cluster_distributor(const rtypes::type_uuid &id, const cads::arena_grid::view &view, cads::arena_grid *arena_grid, const cspatial::conflict_checker::map_cb_type &conflict_check, const base_distributor::dist_success_cb_type &dist_success, size_t capacity, rmath::rng *rng)