fastjet 2.4.3
Functions | Variables

BasicRandom.cc File Reference

#include "fastjet/internal/BasicRandom.hh"
Include dependency graph for BasicRandom.cc:

Go to the source code of this file.

Functions

FASTJET_BEGIN_NAMESPACE int __default_random_generator (int *__iseed)

Variables

BasicRandom< int > _G_random_int
BasicRandom< double > _G_random_double

Function Documentation

FASTJET_BEGIN_NAMESPACE 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.