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 : RandomNumberGeneratorParameters
usingA 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() -> DoubleReturn 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
nnumber of values to produce
ContinuousDistribution Protocol Reference