Uniform

public enum Uniform

Uniform distribution

  • Returns a SSProbDistParams struct containing mean, variance, kurtosis and skewness of the Uniform distribution.

    Throws

    SSSwiftyStatsError if a >= b

    Declaration

    Swift

    public static func para<FPT>(lowerBound a: FPT, upperBound b: FPT) throws -> SSProbDistParams<FPT> where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint

    Parameters

    a

    Lower bound

    b

    Upper bound

  • Returns the pdf of the Uniform distribution.

    Throws

    SSSwiftyStatsError if a >= b

    Declaration

    Swift

    public static func pdf<FPT>(x: FPT, lowerBound a: FPT, upperBound b: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint

    Parameters

    x

    x

    a

    Lower bound

    b

    Upper bound

  • Returns the cdf of the Uniform distribution.

    Throws

    SSSwiftyStatsError if a >= b

    Declaration

    Swift

    public static func cdf<FPT>(x: FPT, lowerBound a: FPT, upperBound b: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint

    Parameters

    x

    x

    a

    Lower bound

    b

    Upper bound

  • Returns the cdf of the Uniform distribution.

    Throws

    SSSwiftyStatsError if a >= b

    Declaration

    Swift

    public static func quantile<FPT>(p: FPT, lowerBound a: FPT, upperBound b: FPT) throws -> FPT where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint

    Parameters

    x

    x

    a

    Lower bound

    b

    Upper bound