Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for generateExponentialSamples (0.16 sec)

  1. src/math/rand/rand_test.go

    				testNormalDistribution(t, numTestSamples, m, sd, seed)
    				if testing.Short() {
    					break
    				}
    			}
    		}
    	}
    }
    
    //
    // Exponential distribution tests
    //
    
    func generateExponentialSamples(nsamples int, rate float64, seed int64) []float64 {
    	r := New(NewSource(seed))
    	samples := make([]float64, nsamples)
    	for i := range samples {
    		samples[i] = r.ExpFloat64() / rate
    	}
    	return samples
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  2. src/math/rand/v2/rand_test.go

    				testNormalDistribution(t, numTestSamples, m, sd, seed)
    				if testing.Short() {
    					break
    				}
    			}
    		}
    	}
    }
    
    //
    // Exponential distribution tests
    //
    
    func generateExponentialSamples(nsamples int, rate float64, seed uint64) []float64 {
    	r := New(NewPCG(seed, seed))
    	samples := make([]float64, nsamples)
    	for i := range samples {
    		samples[i] = r.ExpFloat64() / rate
    	}
    	return samples
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 17.4K bytes
    - Viewed (0)
Back to top