20 TH2D * h0 =
new TH2D(
"h0",
"Pseudo-random Sequence",200,0,1,200,0,1);
21 TH2D *
h1 =
new TH2D(
"h1",
"Sobol Sequence",200,0,1,200,0,1);
22 TH2D * h2 =
new TH2D(
"h2",
"Niederrer Sequence",200,0,1,200,0,1);
32 for (
int i = 0; i <
n; ++i) {
38 for (
int i = 0; i <
n; ++i) {
45 for (
int i = 0; i <
n; ++i) {
46 h2->
Fill(vx[2*i],vx[2*i+1]);
73 for (
int i = 1; i <= h1->
GetNbinsX(); ++i) {
74 for (
int j = 1; j <= h1->
GetNbinsY(); ++j) {
81 std::cout <<
"number of empty bins for pseudo-random = " << nzerobins0 << std::endl;
82 std::cout <<
"number of empty bins for Sobol = " << nzerobins1 << std::endl;
83 std::cout <<
"number of empty bins for Niederreiter = " << nzerobins2 << std::endl;
86 if (nzerobins1 >= nzerobins0 ) iret += 1;
87 if (nzerobins2 >= nzerobins0 ) iret += 2;
92 int main(
int argc,
char **argv)
95 std::cout <<
"***************************************************\n";
96 std::cout <<
" TEST QUASI-RANDOM generators "<< std::endl;
97 std::cout <<
"***************************************************\n\n";
100 for (
Int_t i=1 ; i<argc ; i++) {
101 std::string arg = argv[i] ;
106 std::cout <<
"Usage: " << argv[0] <<
" [-g] [-v]\n";
107 std::cout <<
" where:\n";
108 std::cout <<
" -g : graphics mode\n";
109 std::cout << std::endl;
126 if (iret != 0) std::cerr <<
"TEST QUASI-RANDOM FAILED " << std::endl;
int main(int argc, char **argv)
User class for MathMore random numbers template on the Engine type.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
bool RndmArray(int n, double *array)
Generate an array of random numbers between ]0,1[ Function to preserve ROOT Trandom compatibility The...
void RndmArray(int n, double *array)
Generate an array of random numbers between ]0,1] 0 is excluded and 1 is included Function to preserv...
virtual Int_t GetNbinsX() const
virtual void Run(Bool_t retrn=kFALSE)
Main application eventloop. Calls system dependent eventloop via gSystem.
bool Next(double *x)
Generate next quasi random numbers points.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
unsigned int r1[N_CITIES]
virtual Int_t GetNbinsY() const
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
Int_t Fill(Double_t)
Invalid Fill method.
unsigned int r2[N_CITIES]
Documentation for the Random class.
2-D histogram with a double per channel (see TH1 documentation)}