
    -ji                    ,    S SK Jr  S SKr " S S5      rg)    )annotationsNc                  D    \ rS rSrSrSS	S jjrS
S jr\SS j5       rSr	g)LazyRandomState   zLazy Random State class.


This is a class to initialize the random state just before use to prevent
duplication of the same random state when deepcopy is applied to the instance of sampler.
Nc                L    S U l         Ub  U R                  R                  US9  g g )N)seed)_rngrngr   )selfr   s     \/home/james-whalen/.local/lib/python3.13/site-packages/optuna/samplers/_lazy_random_state.py__init__LazyRandomState.__init__   s&    26	HHMMtM$     c                J    [         R                  R                  5       U l        g N)nprandomRandomStater	   r   s    r   _set_rngLazyRandomState._set_rng   s    II))+	r   c                r    U R                   c  U R                  5         U R                   c   eU R                   $ r   )r	   r   r   s    r   r
   LazyRandomState.rng   s/    99MMOyy$$$yyr   )r	   r   )r   z
int | NonereturnNone)r   r   )r   znp.random.RandomState)
__name__
__module____qualname____firstlineno____doc__r   r   propertyr
   __static_attributes__ r   r   r   r      s%    %
,  r   r   )
__future__r   numpyr   r   r#   r   r   <module>r&      s    "  r   