| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
GaudiHive.precedence.RndBiased10BooleanValue Class Reference
Inheritance diagram for GaudiHive.precedence.RndBiased10BooleanValue:
[legend]
Collaboration diagram for GaudiHive.precedence.RndBiased10BooleanValue:
[legend]

## Public Member Functions
def | __init__ (self, useBuiltinPattern=True)
def | get (self)
def | get_pattern (self)

## Public Attributes
| pattern
| generator

## Static Public Attributes
list | builtinPattern
list | pattern = []

## Private Member Functions
def | _create_generator (self, pattern)

## Detailed Description

    Provides randomly distributed boolean value with True taking only 10%.
    The distribution has only 276 values and is reproducible, if no pattern re-generation is requested.

Definition at line 87 of file precedence.py.

## Constructor & Destructor Documentation

def GaudiHive.precedence.RndBiased10BooleanValue.__init__ | ( |  | self,
|  |  | useBuiltinPattern = `True`
| ) |  |

Definition at line 98 of file precedence.py.

98 def __init__(self, useBuiltinPattern=True):
99
100 if useBuiltinPattern:
101 self.pattern = self.builtinPattern
102 else:
103 # 278 values, biased approximately as 90% to 10% (276 precedence graph algorithms, plus two algorithms added manually - DstWriter and Framework)
104 self.pattern = [False for i in range(
105 249)] + [True for i in range(29)]
106 random.shuffle(self.pattern)
107
108 self.generator = self._create_generator(self.pattern)
109
GaudiHive.precedence.RndBiased10BooleanValue.generator
generator
Definition: precedence.py:108
GaudiHive.precedence.RndBiased10BooleanValue._create_generator
def _create_generator(self, pattern)
Definition: precedence.py:110
GaudiHive.precedence.RndBiased10BooleanValue.__init__
def __init__(self, useBuiltinPattern=True)
Definition: precedence.py:98
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&...args)
Zips multiple containers together to form a single range.
Definition: FunctionalDetails.h:85
GaudiHive.precedence.RndBiased10BooleanValue.pattern
list pattern
Definition: precedence.py:96
GaudiHive.precedence.RndBiased10BooleanValue.builtinPattern
list builtinPattern
Definition: precedence.py:94

## Member Function Documentation

def GaudiHive.precedence.RndBiased10BooleanValue._create_generator | ( |  | self,
|  |  | pattern
| ) |  |
| private

Definition at line 110 of file precedence.py.

110 def _create_generator(self, pattern):
111
112 for b in pattern:
113 yield b
114
GaudiHive.precedence.RndBiased10BooleanValue._create_generator
def _create_generator(self, pattern)
Definition: precedence.py:110

def GaudiHive.precedence.RndBiased10BooleanValue.get | ( |  | self | ) |

Definition at line 115 of file precedence.py.

115 def get(self):
116
117 return next(self.generator)
118
GaudiHive.precedence.RndBiased10BooleanValue.generator
generator
Definition: precedence.py:108
GaudiHive.precedence.RndBiased10BooleanValue.get
def get(self)
Definition: precedence.py:115

def GaudiHive.precedence.RndBiased10BooleanValue.get_pattern | ( |  | self | ) |

Definition at line 119 of file precedence.py.

119 def get_pattern(self):
120
121 return self.pattern
122
123
GaudiHive.precedence.RndBiased10BooleanValue.get_pattern
def get_pattern(self)
Definition: precedence.py:119
GaudiHive.precedence.RndBiased10BooleanValue.pattern
list pattern
Definition: precedence.py:96

## Member Data Documentation

list GaudiHive.precedence.RndBiased10BooleanValue.builtinPattern
| static

Initial value:
1 = [True, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, True, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, True, False, True, False, False, False, False, False, False, False, False, True, False, True, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, True, False, False, False, False, True, True, False,
2 False, False, False, False, False, False, False, False, False, True, True, False, True, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, True, False, False, False, True, False, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, True, False, True]

Definition at line 94 of file precedence.py.

GaudiHive.precedence.RndBiased10BooleanValue.generator

Definition at line 108 of file precedence.py.

list GaudiHive.precedence.RndBiased10BooleanValue.pattern = []
| static

Definition at line 96 of file precedence.py.

GaudiHive.precedence.RndBiased10BooleanValue.pattern

Definition at line 101 of file precedence.py.

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

- GaudiHive/python/GaudiHive/precedence.py