Class powerlaw_cluster_placer

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public rer::client< powerlaw_cluster_placer >

Class Documentation

class powerlaw_cluster_placer : public rer::client<powerlaw_cluster_placer>

Calculates the placement of N clusters of sizes drawn from a configured powerlaw distribution in the area during initialization.

Public Types

using placements = std::vector<placement>

Public Functions

powerlaw_cluster_placer(carena::base_arena_map *map, const rmath::vector3d &c_block_bb, size_t n_attempts, rmath::rng *rng)
powerlaw_cluster_placer(const powerlaw_cluster_placer&) = delete
powerlaw_cluster_placer(powerlaw_cluster_placer&&) = delete
placements operator()(const cds::const_spatial_entity_vector &c_entities, const std::vector<size_t> &c_sizes)

Perform a “guess and check” cluster placement until you get a distribution without overlap, or cfbd::base_distributor::kMAX_DIST_TRIES is exceeded, whichever happens first.

Cluster sizes are drawn from the internal power law distribution.

const powerlaw_cluster_placer &operator=(const powerlaw_cluster_placer&) = delete
powerlaw_cluster_placer &operator=(powerlaw_cluster_placer&&) = delete
struct placement

Public Members

size_t capacity
rtypes::type_uuid id
cads::arena_grid::view view
rmath::rangez xrange
rmath::rangez yrange