multovl  1.3
Multiple overlaps of genomic regions
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
multovl::prob::RandomPlacer Class Reference

#include "randomplacer.hh"

Public Member Functions

 RandomPlacer ()
 Init to empty.
 
 RandomPlacer (const std::vector< Region > &Regions)
 
bool add (unsigned int len)
 
void random_placement (const FreeRegions &frees, UniformGen &rng)
 
const std::vector< Region > & get_regions () const
 Returns the randomly placed regions after a random_placement(...) call.
 

Detailed Description

A RandomPlacer object is responsible for placing a set of regions randomly within a prescribed set of free regions.

Constructor & Destructor Documentation

multovl::prob::RandomPlacer::RandomPlacer ( const std::vector< Region > &  Regions)
explicit

Inits with regions to be placed randomly within free regions.

Parameters
Regionsthe regions to be shuffled. Note that only the lengths of the regions will be used.

Member Function Documentation

bool multovl::prob::RandomPlacer::add ( unsigned int  len)

Adds the length of a region to the calling object.

Parameters
lenthe region length, should be > 0
Returns
true on success, false if /len/ == 0 (which will not be added)
void multovl::prob::RandomPlacer::random_placement ( const FreeRegions frees,
UniformGen rng 
)

Performs a shuffling.

Parameters
freesa FreeRegions object containing the free regions
rnga uniform [0,1) random number generator

The documentation for this class was generated from the following file: