/// <summary> /// Creates a new poisson distribution.<para/> /// Construct histogram array for poisson distribution.<para/> /// Construct histogram array for poisson distribution with lambda <c>lambda</c>. /// For lambda greater than 2000 optimization with normal distribution is used. /// </summary> /// <param name="lambda">lambda for poisson distribution</param> public PoissonDistribution(double lambda) { _distributions = new DiscreteDistribution(); _lambda = lambda; _status = CudaRandNativeMethods.curandCreatePoissonDistribution(lambda, ref _distributions); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandCreatePoissonDistribution", _status)); if (_status != CurandStatus.Success) throw new CudaRandException(_status); }
/// <summary> /// Creates a new poisson distribution.<para/> /// Construct histogram array for poisson distribution.<para/> /// Construct histogram array for poisson distribution with lambda <c>lambda</c>. /// For lambda greater than 2000 optimization with normal distribution is used. /// </summary> /// <param name="lambda">lambda for poisson distribution</param> public PoissonDistribution(double lambda) { _distributions = new DiscreteDistribution(); _lambda = lambda; _status = CudaRandNativeMethods.curandCreatePoissonDistribution(lambda, ref _distributions); Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "curandCreatePoissonDistribution", _status)); if (_status != CurandStatus.Success) { throw new CudaRandException(_status); } }
public static extern CurandStatus curandDestroyDistribution(DiscreteDistribution discrete_distribution);
public static extern CurandStatus curandCreatePoissonDistribution(double lambda, ref DiscreteDistribution discrete_distribution);