std::philox_engine<UIntType,w,n,r,consts>:: set_counter
      From cppreference.net
     
     
      
       <
       
        cpp
       
        |
       
        numeric
       
        |
       
        random
       
        |
       
        philox engine
       
      
     
     
        
         C++
        
        
         
          
           
          
          
         
        
       
       
        
         Numerics library
        
        
         
          
           
            
          
          
          
         
        
       
       | Common mathematical functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical special functions (C++17) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Mathematical constants (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Basic linear algebra algorithms (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Data-parallel types (SIMD) (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Floating-point environment (C++11) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Complex numbers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
              
               Numeric array (
               
                valarray
               
               )
              
              | 
            |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Pseudo-random number generation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Bit manipulation (C++20) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Saturation arithmetic (C++26) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Factor operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
              
  | 
             
              
  | 
            ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Interpolations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
              
  | 
             
              
  | 
            ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Generic numeric operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
              
  | 
             
              
  | 
            ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| C-style checked integer arithmetic | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
              
  | 
            |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
        
         Pseudo-random number generation
        
        
         
          
           
            
          
          
          
         
        
       
       
              
  | 
             
              
  | 
            |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
        
         
          std::philox_engine
         
        
        
         
          
           
            
          
          
          
         
        
       
       | Member functions | ||||
| 
               
                
                 
                  
                   philox_engine::set_counter
                  
                 
                
                
               | 
            ||||
| Generation | ||||
| Characteristics | ||||
| Non-member functions | ||||
| 
               
                
                 
                  
                   (C++26)
                  
                 
                
                
               | 
            ||||
| 
               
                
                 
                  
                   (C++26)
                  
                 
                 
                  
                   (C++26)
                  
                 
                
                
               | 
            
| 
           
           
            
             void
            
            set_counter
            
             (
            
            
             const
            
            
             
              std::
              
               array
              
             
            
            
             <
            
            result_type, n
            
             >
            
            
             &
            
            c
            
             )
            
            
             ;
            
           
           
          | 
         (C++26부터) | |
난수 엔진의 카운터 를 설정합니다.
- 
        각 정수
        
         
          k
         
        
        에 대해
        
         
[ 0 ,n)범위 내에서, \(\scriptsize X_k \) X k 을 \(\scriptsize c_{n-1-k} \mod 2^w \) c n-1-k mod 2 w
으로 설정합니다. - j 의 값은 n - 1 으로 설정됩니다. [1]
 
- ↑ j 가 n - 1 로 설정되므로, 다음 상태 전환은 항상 새로운 난수 값을 생성합니다.
 
매개변수
| c | - | 카운터를 설정하는 데 사용할 카운터 시퀀스 | 
복잡도
\(\scriptsize O(n) \) O(n) .
참고 항목
| 
         엔진을 생성합니다
          (public member function)  | 
       |
| 
         엔진의 현재 상태를 설정합니다
          (public member function)  |