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

#include <EquidistantSampler1D.hh>

Inheritance diagram for npstat::EquidistantSampler1D:
npstat::AbsRandomGenerator

Public Member Functions

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

Detailed Description

Simple equidistant sampler of the unit interval conforming to the AbsRandomGenerator interface. Imagine that the interval [0,1] is split into bins, like in a histogram. The samples will be taken in the middle of those bins – either from left to right of from right to left, depending on the value of "increasingOrder" costructor parameter.

Member Function Documentation

◆ dim()

unsigned npstat::EquidistantSampler1D::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.

◆ maxPoints()

unsigned long long npstat::EquidistantSampler1D::maxPoints ( ) const
inlinevirtual

Maximum number of points which can be meaningfully produced by this generator (this is usually the generator period). If 0 is returned, it means that this number is larger than the maximum value of unsigned long long (which is typically 2^64 - 1). Override as necessary.

Reimplemented from npstat::AbsRandomGenerator.

◆ operator()()

double npstat::EquidistantSampler1D::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.


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