ROOT
6.30.04
Reference Guide
All
Namespaces
Files
Pages
UnuranRng.h
Go to the documentation of this file.
1
// @(#)root/unuran:$Id$
2
// Author: L. Moneta Wed Sep 27 11:22:34 2006
3
4
/**********************************************************************
5
* *
6
* Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
7
* *
8
* *
9
**********************************************************************/
10
11
// Header file for class UnuranRng
12
13
#ifndef ROOT_UnuranRng
14
#define ROOT_UnuranRng
15
16
17
/**
18
UnuranRng class for interface ROOT random generators to Unuran
19
*/
20
21
template
<
class
Random>
22
struct
UnuranRng {
23
24
public
:
25
26
/// function to delete object (not needed)
27
static
void
Delete(
void
*
/* p */
) {
28
// Random * r = reinterpret_cast<Random *> (p);
29
// delete r;
30
}
31
32
/// function to set the seed in the random
33
static
void
Seed(
void
* p,
unsigned
long
seed) {
34
Random * r =
reinterpret_cast<
Random *
>
(p);
35
r->SetSeed(seed);
36
}
37
38
/// function to sample random generator
39
static
double
Rndm(
void
* p) {
40
Random * r =
reinterpret_cast<
Random *
>
(p);
41
return
r->Rndm();
42
}
43
44
45
};
46
47
48
49
#endif
/* ROOT_UnuranRng */
math
unuran
src
UnuranRng.h
Generated on Tue May 5 2020 14:03:09 for ROOT by
1.8.5