
    (^i                    ,    d dl mZ d dlZ G d d      Zy)    )annotationsNc                  4    e Zd ZdZdddZddZed	d       Zy)
LazyRandomStatezLazy 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                P    d | _         || j                  j                  |       y y )N)seed)_rngrngr   )selfr   s     c/var/www/html/hubwallet-dev/venv/lib/python3.12/site-packages/optuna/samplers/_lazy_random_state.py__init__zLazyRandomState.__init__   s&    26	HHMMtM$     c                J    t         j                  j                         | _        y N)nprandomRandomStater   r
   s    r   _set_rngzLazyRandomState._set_rng   s    II))+	r   c                n    | j                   | j                          | j                   J | j                   S r   )r   r   r   s    r   r	   zLazyRandomState.rng   s/    99MMOyy$$$yyr   r   )r   z
int | NonereturnNone)r   r   )r   znp.random.RandomState)__name__
__module____qualname____doc__r   r   propertyr	    r   r   r   r      s%    %
,  r   r   )
__future__r   numpyr   r   r   r   r   <module>r       s    "  r   