VonMises

public enum VonMises

von Mises (circular) distribution

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

    Throws

    SSSwiftyStatsError if c <= 0

    Declaration

    Swift

    public static func para<FPT>(mean m: FPT, concentration c: FPT) throws -> SSProbDistParams<FPT> where FPT : Decodable, FPT : Encodable, FPT : SSFloatingPoint

    Parameters

    x

    x

    m

    mean

    c

    direction

  • Returns the pdf of the von Mises distribution

    Throws

    SSSwiftyStatsError if c <= 0

    Declaration

    Swift

    public static func pdf(x: Double!, mean m: Double!, concentration c: Double!) throws -> Double

    Parameters

    x

    x

    m

    mean

    c

    direction

  • Returns the cdf of the von Mises distribution

    Throws

    SSSwiftyStatsError if c <= 0

    Declaration

    Swift

    public static func cdf(x: Double!, mean m: Double!, concentration c: Double!, useExpIntegration: Bool = false) throws -> Double

    Parameters

    x

    x

    m

    mean

    c

    direction

    useExpIntegration

    If true, use the double exponential rule to integrate the pdf

  • Returns the quantile function of the von Mises distribution adapted from: http://rapidq.phatcode.net/examples/Math

    Throws

    SSSwiftyStatsError if c <= 0 or/and p < 0 or p > 1.0

    Declaration

    Swift

    public static func quantile(p: Double!, mean m: Double!, concentration c: Double!) throws -> Double

    Parameters

    p

    p

    m

    Mean

    c

    concentration