npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::RegularSampler1D Class Reference

#include <RegularSampler1D.hh>

Inheritance diagram for npstat::RegularSampler1D:
npstat::AbsRandomGenerator

Public Member Functions

unsigned dim () const
 
unsigned long long nCalls () const
 
double operator() ()
 
void reset ()
 
- Public Member Functions inherited from npstat::AbsRandomGenerator
virtual unsigned long long maxPoints () const
 
virtual void run (double *buf, const unsigned bufLen, const unsigned nPt)
 

Static Public Member Functions

static unsigned long long uniformCount (unsigned level)
 

Detailed Description

Simple regular sampler of the unit interval conforming to the AbsRandomGenerator interface. It first splits [0,1] into two equal intervals and returns the coordinate of the boundary (i.e., 0.5). Then it splits the two obtained intervals (the returned points are at 0.25 and 0.75). Then it splits the four intervals, then it splits the eight intervals, and so on. The coordinates of the boundaries are returned from left to right for each level of splitting.

Member Function Documentation

◆ dim()

unsigned npstat::RegularSampler1D::dim ( ) const
inlinevirtual

Dimensionality of the generated vectors (or points). It is expected that "dim()" will always be 1 for pseudo-random (as opposed to quasi-random) generators.

Implements npstat::AbsRandomGenerator.

◆ operator()()

double npstat::RegularSampler1D::operator() ( )
virtual

Standard 1-d generator function. It should generate a run-time error for essentially multivariate generators whose dimensionality is larger than 1.

Implements npstat::AbsRandomGenerator.

◆ reset()

void npstat::RegularSampler1D::reset ( )

Reset to the initial state

◆ uniformCount()

static unsigned long long npstat::RegularSampler1D::uniformCount ( unsigned  level)
static

This method should be called to determine the number of generated points after which the interval will be uniformly sampled. The "level" can be 0, 1, 2, ..., 62.


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