/usr/include/CLHEP/Random/RandBit.icc is in libclhep-dev 2.1.4.1+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | // $Id: RandBit.icc,v 1.3 2010/06/16 17:24:53 garren Exp $
// -*- C++ -*-
//
// -----------------------------------------------------------------------
// HEP Random
// --- RandBit ---
// inlined functions implementation file
// -----------------------------------------------------------------------
// =======================================================================
// M.Fischler - Created, along same lines as RandGaussQ.icc
// =======================================================================
namespace CLHEP {
inline RandBit::RandBit(HepRandomEngine & anEngine)
: RandFlat (anEngine)
{}
inline RandBit::RandBit(HepRandomEngine & anEngine, double width )
: RandFlat (anEngine, width)
{}
inline RandBit::RandBit(HepRandomEngine & anEngine, double a,
double b )
: RandFlat (anEngine, a, b)
{}
inline RandBit::RandBit(HepRandomEngine * anEngine)
: RandFlat (anEngine)
{}
inline RandBit::RandBit(HepRandomEngine * anEngine, double width )
: RandFlat (anEngine, width)
{}
inline RandBit::RandBit(HepRandomEngine * anEngine, double a,
double b )
: RandFlat (anEngine, a, b)
{}
//---------------------
inline int RandBit::shootBit() {
double x = shoot();
return (x > .5) ? 1 : 0;
}
//---------------------
inline int RandBit::shootBit(HepRandomEngine* engine) {
double x = shoot(engine);
return (x > .5) ? 1 : 0;
}
//---------------------
inline int RandBit::fireBit() {
double x = fire(0,1);
return (x > .5) ? 1 : 0;
}
} // namespace CLHEP
|