RandomDistributionKit
Add random distribution to random data generator framework RandomKit
var d: RandomDistribution = .exponential(rate: λ)
Double.random(distribution: d)
d = .gaussian(mean: 0, standardDeviation: 1)
let array: [Double] = Array(randomCount: 1000, distribution: d)
Installation
Using CocoaPods
CocoaPods is a centralized dependency manager for Objective-C and Swift. Go here to learn more.
-
Add the project to your Podfile.
use_frameworks! pod 'RandomDistributionKit'
-
Run
pod install
and open the.xcworkspace
file to launch Xcode.
Using Carthage
...
Using SPM
...