@@ -30,8 +30,8 @@ class ListIndexState( BaseRandom ):
3030 """The base class for all LFib PRNG based on 64-bits numbers.
3131
3232 Definition of the class of the internal state data for many pseudo
33- random generators: those that embed a list a integers and maybe an
34- index related to this list..
33+ random generators: those that embed a list of integers and maybe an
34+ index related to this list.
3535
3636 This module is part of library PyRandLib.
3737
@@ -47,14 +47,13 @@ def __init__(self, _initRandClass, _stateSize: int, _seedState: SeedStateType =
4747 initialization of the internal state list of integers.
4848 _stateSize is the size of the internal state list of integers.
4949 _seedState is either a valid state, an integer, a float or None.
50- About valid state: this is a tuple containing a list of
50+ About valid state: this is a tuple containing a list of
5151 self._STATE_SIZE integers and an index in this list (index value
5252 being then in range (0,self._STATE_SIZE)). Should _seedState be
53- a sole integer or float then it is used as initial seed for
53+ a sole integer or float then it is used as initial seed for
5454 the random filling of the internal list of self._STATE_SIZE
55- integers. Should _seedState be anything else (e.g. None) then
56- the shuffling of the local current time value is used as such an
57- initial seed.
55+ integers. Should _seedState be None) then the shuffling of the
56+ local current time value is used as such an initial seed.
5857 """
5958 self ._initRandClass = _initRandClass
6059 self ._STATE_SIZE = _stateSize
@@ -66,11 +65,11 @@ def __init__(self, _initRandClass, _stateSize: int, _seedState: SeedStateType =
6665
6766 #-------------------------------------------------------------------------
6867 def getstate (self ) -> StateType :
69- """Returns an object capturing the current internal state of the generator.
68+ """Returns a tuple capturing the current internal state of the generator.
7069
71- This object can be passed to setstate() to restore the state. It is a
72- tuple containing a list of self._STATE_SIZE integers and an
73- index in this list (index value being then in range(0,self._STATE_SIZE).
70+ This object can be passed to setstate() to restore the state. It is a
71+ tuple containing a list of self._STATE_SIZE integers and an index in
72+ this list (index value being then in range(0,self._STATE_SIZE).
7473 """
7574 return (self ._state , self ._index ) # type: ignore
7675
@@ -152,9 +151,9 @@ def _initstate(self, _initialSeed: Numerical = None, /) -> None: # type: ignore
152151 """Inits the internal list of values.
153152
154153 Inits the internal list of values according to some initial
155- seed that has to be an integer or a float ranging within
156- [0.0, 1.0). Should it be None or anything else then the
157- current local time value is used as initial seed value.
154+ seed that has to be an integer, or a float ranging within
155+ [0.0, 1.0). Should it be None then the current local time
156+ value is used as the initial seed value.
158157 """
159158 initRand = self ._initRandClass ( _initialSeed )
160159 self ._state = [ initRand () for _ in range (self ._STATE_SIZE ) ]
0 commit comments