ATLAS Offline Software
Loading...
Searching...
No Matches
python.samplers.CyclicSeqSampler Class Reference
Inheritance diagram for python.samplers.CyclicSeqSampler:
Collaboration diagram for python.samplers.CyclicSeqSampler:

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 __init__ (self, *args)
 shoot (self)
 __call__ (self)

Public Attributes

 sequence = args[0]
int index = 0

Detailed Description

Definition at line 223 of file samplers.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

python.samplers.CyclicSeqSampler.__init__ ( self,
* args )

Definition at line 226 of file samplers.py.

226 def __init__(self, *args):
227 if len(args) == 1:
228 self.sequence = args[0]
229 else:
230 self.sequence = args
231 self.index = 0
232

Member Function Documentation

◆ __call__()

python.samplers.Sampler.__call__ ( self)
inherited
This is the call method that will actually be used (so that normal
functions can also be passed in as samplers).

Definition at line 17 of file samplers.py.

17 def __call__(self):
18 """This is the call method that will actually be used (so that normal
19 functions can also be passed in as samplers)."""
20 return self.shoot()
21

◆ shoot()

python.samplers.CyclicSeqSampler.shoot ( self)

Reimplemented from python.samplers.Sampler.

Definition at line 233 of file samplers.py.

233 def shoot(self):
234 self.index = (self.index + 1) % len(self.sequence)
235 return self.sequence[self.index]

Member Data Documentation

◆ index

int python.samplers.CyclicSeqSampler.index = 0

Definition at line 231 of file samplers.py.

◆ sequence

python.samplers.CyclicSeqSampler.sequence = args[0]

Definition at line 228 of file samplers.py.


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