ContinuousDistribution
public protocol ContinuousDistribution
Protocol for continuous distributions.
Defines the quantile()
method that must be implemented.
-
Undocumented
Declaration
Swift
func quantile(_ p: Double) -> Double
-
random(using:)
Extension methodSingle discrete random value using a user-provided random number generator
Declaration
Swift
public func random<T>(using generator: inout T) -> Double where T : RandomNumberGenerator
Parameters
using
A random number generator
Return Value
A random number from the distribution represented by the instance
-
random()
Extension methodSingle discrete random value using the system random number generator
Declaration
Swift
public func random() -> Double
Return Value
A random number from the distribution represented by the instance
-
random(_:)
Extension methodArray of discrete random values
Complexity
O(n)Declaration
Swift
public func random(_ n: Int) -> [Double]
Parameters
n
number of values to produce