Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::random::TKiss< UIntType, val > Class Template Reference

#include <arcane/core/random/TKiss.h>

Collaboration diagram for Arcane::random::TKiss< UIntType, val >:

Public Types

typedef UIntType result_type
typedef UIntType state_type

Public Member Functions

result_type min () const
 Returns the minimum possible value of a sequence.
result_type max () const
 Returns the maximum possible value of a sequence.
 TKiss (UIntType x0=30903, UIntType y0=30903, UIntType z0=30903, UIntType w0=30903, UIntType carry0=0)
 Constructor with initialization of the seed array from the argument values.
void seed (UIntType *state)
 Initialization of the seed array from the state. The generator state state must consist of five elements.
void seed (UIntType x0)
 Initialization of the seed array from the value x0. The seed array of this generator consists of five elements. The first four elements take the value x0. The fifth element takes the zero value.
void seed (UIntType x0, UIntType y0, UIntType z0, UIntType w0, UIntType carry0)
 Initialization of the seed array from the argument values.
UIntType getState (Integer i) const
 Method that returns the i-th component of the generator state. The complete generator state is given by the indices i ranging between 0 and 4 ( 0 < i <= 4 ).
UIntType operator() ()
 Overdefinition of the () operator which returns the pseudo-random value. The generator state is modified.
bool validation (UIntType x) const
 Validation function (I don't know what it's for!).
bool operator== (const TKiss &rhs) const
 Overdefinition of the == operator.

Static Public Attributes

static const bool has_fixed_range = true
static const result_type min_value = 0
static const result_type max_value = 4294967295U

Private Attributes

state_type _state [5]

Detailed Description

template<typename UIntType, UIntType val>
class Arcane::random::TKiss< UIntType, val >

Kiss class template. It allows defining Kiss generator classes. The pseudo-random numbers generated are of type UIntType. The generation of these numbers is performed by calling the () operator. The state of the generator is defined by a private member _state[i] of the class, which is an array of five elements (0<i<=4). The seed (state state[i] 0<i<=4 initial of the generator, also called seed array) is initialized by calling the constructor or the various seed methods available.

Definition at line 39 of file TKiss.h.

Member Typedef Documentation

◆ result_type

template<typename UIntType, UIntType val>
typedef UIntType Arcane::random::TKiss< UIntType, val >::result_type

Definition at line 43 of file TKiss.h.

◆ state_type

template<typename UIntType, UIntType val>
typedef UIntType Arcane::random::TKiss< UIntType, val >::state_type

Definition at line 44 of file TKiss.h.

Constructor & Destructor Documentation

◆ TKiss()

template<typename UIntType, UIntType val>
Arcane::random::TKiss< UIntType, val >::TKiss ( UIntType x0 = 30903,
UIntType y0 = 30903,
UIntType z0 = 30903,
UIntType w0 = 30903,
UIntType carry0 = 0 )
inlineexplicit

Constructor with initialization of the seed array from the argument values.

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 77 of file TKiss.h.

Member Function Documentation

◆ getState()

template<typename UIntType, UIntType val>
UIntType Arcane::random::TKiss< UIntType, val >::getState ( Integer i) const
inline

Method that returns the i-th component of the generator state. The complete generator state is given by the indices i ranging between 0 and 4 ( 0 < i <= 4 ).

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 144 of file TKiss.h.

◆ max()

template<typename UIntType, UIntType val>
result_type Arcane::random::TKiss< UIntType, val >::max ( ) const
inline

Returns the maximum possible value of a sequence.

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 67 of file TKiss.h.

◆ min()

template<typename UIntType, UIntType val>
result_type Arcane::random::TKiss< UIntType, val >::min ( ) const
inline

Returns the minimum possible value of a sequence.

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 57 of file TKiss.h.

◆ operator()()

template<typename UIntType, UIntType val>
UIntType Arcane::random::TKiss< UIntType, val >::operator() ( )
inline

Overdefinition of the () operator which returns the pseudo-random value. The generator state is modified.

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 154 of file TKiss.h.

◆ operator==()

template<typename UIntType, UIntType val>
bool Arcane::random::TKiss< UIntType, val >::operator== ( const TKiss< UIntType, val > & rhs) const
inline

Overdefinition of the == operator.

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 187 of file TKiss.h.

◆ seed() [1/3]

template<typename UIntType, UIntType val>
void Arcane::random::TKiss< UIntType, val >::seed ( UIntType * state)
inline

Initialization of the seed array from the state. The generator state state must consist of five elements.

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 95 of file TKiss.h.

◆ seed() [2/3]

template<typename UIntType, UIntType val>
void Arcane::random::TKiss< UIntType, val >::seed ( UIntType x0)
inline

Initialization of the seed array from the value x0. The seed array of this generator consists of five elements. The first four elements take the value x0. The fifth element takes the zero value.

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 112 of file TKiss.h.

◆ seed() [3/3]

template<typename UIntType, UIntType val>
void Arcane::random::TKiss< UIntType, val >::seed ( UIntType x0,
UIntType y0,
UIntType z0,
UIntType w0,
UIntType carry0 )
inline

Initialization of the seed array from the argument values.

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 127 of file TKiss.h.

◆ validation()

template<typename UIntType, UIntType val>
bool Arcane::random::TKiss< UIntType, val >::validation ( UIntType x) const
inline

Validation function (I don't know what it's for!).

Author
Patrick Rathouit
Date
28/07/2006

Definition at line 177 of file TKiss.h.

Member Data Documentation

◆ _state

template<typename UIntType, UIntType val>
state_type Arcane::random::TKiss< UIntType, val >::_state[5]
private

Definition at line 194 of file TKiss.h.

◆ has_fixed_range

template<typename UIntType, UIntType val>
const bool Arcane::random::TKiss< UIntType, val >::has_fixed_range = true
static

Definition at line 45 of file TKiss.h.

◆ max_value

template<typename UIntType, UIntType val>
const result_type Arcane::random::TKiss< UIntType, val >::max_value = 4294967295U
static

Definition at line 47 of file TKiss.h.

◆ min_value

template<typename UIntType, UIntType val>
const result_type Arcane::random::TKiss< UIntType, val >::min_value = 0
static

Definition at line 46 of file TKiss.h.


The documentation for this class was generated from the following file: