fastjet 2.4.5
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
fastjet::BasicRandom< int > Class Template Reference

#include <BasicRandom.hh>

List of all members.

Public Types

typedef int value_type
typedef unsigned int size_type
typedef value_typepointer

Public Member Functions

 BasicRandom (int __s1=12345, int __s2=67890)
value_type operator() ()
void operator() (size_type __n, pointer __res)
void randomize (void *__iseed)
void set_status (const std::vector< int > &__iseed)
void get_status (std::vector< int > &__iseed)
void print_info (std::ostream &__os=std::cout)

Static Public Member Functions

static value_type min ()
static value_type max ()

Private Attributes

int _M_iseed [2]

Detailed Description

template<>
class fastjet::BasicRandom< int >

Definition at line 58 of file BasicRandom.hh.


Member Typedef Documentation

Definition at line 63 of file BasicRandom.hh.

typedef unsigned int fastjet::BasicRandom< int >::size_type

Definition at line 62 of file BasicRandom.hh.

typedef int fastjet::BasicRandom< int >::value_type

Definition at line 61 of file BasicRandom.hh.


Constructor & Destructor Documentation

fastjet::BasicRandom< int >::BasicRandom ( int  __s1 = 12345,
int  __s2 = 67890 
) [inline, explicit]

Definition at line 66 of file BasicRandom.hh.

                                                           {
    _M_iseed[0] = __s1;
    _M_iseed[1] = __s2;
  }

Member Function Documentation

void fastjet::BasicRandom< int >::get_status ( std::vector< int > &  __iseed) [inline]

Definition at line 94 of file BasicRandom.hh.

                                            {
    __iseed.resize(2);
    __iseed[0] = _M_iseed[0];
    __iseed[1] = _M_iseed[1];
  }
static value_type fastjet::BasicRandom< int >::max ( ) [inline, static]

Definition at line 102 of file BasicRandom.hh.

{ return 2147483647;}
static value_type fastjet::BasicRandom< int >::min ( ) [inline, static]

Definition at line 101 of file BasicRandom.hh.

{ return 0;}
value_type fastjet::BasicRandom< int >::operator() ( ) [inline]

Definition at line 72 of file BasicRandom.hh.

References fastjet::__default_random_generator().

void fastjet::BasicRandom< int >::operator() ( size_type  __n,
pointer  __res 
) [inline]

Definition at line 76 of file BasicRandom.hh.

References fastjet::__default_random_generator().

                                                 {
    for(size_type __i = 0; __i < __n; __i++) 
      __res[__i] = __default_random_generator(_M_iseed);
  }
void fastjet::BasicRandom< int >::print_info ( std::ostream &  __os = std::cout) [inline]

Definition at line 105 of file BasicRandom.hh.

                                              {
    __os<<"BasicRandom<int> : "<<_M_iseed[0]<<", "<<_M_iseed[1]<<std::endl;
  }
void fastjet::BasicRandom< int >::randomize ( void *  __iseed) [inline]

Definition at line 82 of file BasicRandom.hh.

                                {
    int *__new_seed = (int*) __iseed;
    _M_iseed[0] = __new_seed[0];
    _M_iseed[1] = __new_seed[1];
  }
void fastjet::BasicRandom< int >::set_status ( const std::vector< int > &  __iseed) [inline]

Definition at line 88 of file BasicRandom.hh.

                                                  {
    assert(__iseed.size() >= 2);
    _M_iseed[0] = __iseed[0];
    _M_iseed[1] = __iseed[1];
  }

Member Data Documentation

int fastjet::BasicRandom< int >::_M_iseed[2] [private]

Definition at line 110 of file BasicRandom.hh.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines