Berkeley Nuclear Data Software
Public Member Functions | List of all members
SampleACE Class Reference

Class to perform random sampling of data. More...

#include <SampleACE.h>

Public Member Functions

 SampleACE ()
 default constructor - random seed for engine More...
 
 SampleACE (std::minstd_rand a_randEng)
 
int sample (vector< double > a_data)
 
int sample (vector< double > a_data, vector< double > a_domain)
 for variable bin widths More...
 
double sampleBin (vector< double > a_lower, vector< double > a_upper)
 
double next ()
 returns next random number between [0,1]; More...
 

Detailed Description

Class to perform random sampling of data.

Constructor & Destructor Documentation

◆ SampleACE() [1/2]

SampleACE::SampleACE ( )

default constructor - random seed for engine

◆ SampleACE() [2/2]

SampleACE::SampleACE ( std::minstd_rand  a_randEng)

Member Function Documentation

◆ next()

double SampleACE::next ( )

returns next random number between [0,1];

Here is the caller graph for this function:

◆ sample() [1/2]

int SampleACE::sample ( vector< double >  a_data)

returns index of sampled thing in data takes in vector of probabilities

compute total

construct CDF

Here is the caller graph for this function:

◆ sample() [2/2]

int SampleACE::sample ( vector< double >  a_data,
vector< double >  a_domain 
)

for variable bin widths

compute total area

construct CDF

◆ sampleBin()

double SampleACE::sampleBin ( vector< double >  a_lower,
vector< double >  a_upper 
)
Here is the caller graph for this function:

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