#include "randomplacer.hh"
A RandomPlacer object is responsible for placing a set of regions randomly within a prescribed set of free regions.
multovl::prob::RandomPlacer::RandomPlacer |
( |
const std::vector< Region > & |
Regions | ) |
|
|
explicit |
Inits with regions to be placed randomly within free regions.
- Parameters
-
Regions | the regions to be shuffled. Note that only the lengths of the regions will be used. |
bool multovl::prob::RandomPlacer::add |
( |
unsigned int |
len | ) |
|
Adds the length of a region to the calling object.
- Parameters
-
len | the region length, should be > 0 |
- Returns
- true on success, false if /len/ == 0 (which will not be added)
Performs a shuffling.
- Parameters
-
frees | a FreeRegions object containing the free regions |
rng | a uniform [0,1) random number generator |
The documentation for this class was generated from the following file: