fastjet 2.4.3
Classes | Functions | Variables

BasicRandom.hh File Reference

#include <iostream>
#include <vector>
#include <cassert>
#include "fastjet/internal/base.hh"
Include dependency graph for BasicRandom.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BasicRandom< _Tp >
class  BasicRandom< int >
class  BasicRandom< double >
 template specialization (double) for the BasicRandom template class. More...

Functions

int __default_random_generator (int *__iseed)

Variables

BasicRandom< int > _G_random_int
BasicRandom< double > _G_random_double

Function Documentation

int __default_random_generator ( int *  __iseed)

Definition at line 31 of file BasicRandom.cc.

Referenced by BasicRandom< double >::operator()(), and BasicRandom< int >::operator()().

{
  int __k = __iseed[0]/53668;
  __iseed[0] = (__iseed[0] - __k*53668)*40014 - __k*12211;
  if(__iseed[0] < 0) __iseed[0] += 2147483563;
  
  __k = __iseed[1]/52774;
  __iseed[1] = (__iseed[1] - __k*52774)*40692 - __k*3791;
  if(__iseed[1] < 0) __iseed[1] += 2147483399;
  
  int __iz = __iseed[0] - __iseed[1];
  if(__iz < 1) __iz += 2147483562;
  
  return __iz;
}

Variable Documentation

Definition at line 49 of file BasicRandom.cc.

Definition at line 48 of file BasicRandom.cc.