MembershipFunction

public struct MembershipFunction<U>

Undocumented

  • Undocumented

    Declaration

    Swift

    public typealias FunctionType = (U) -> Grade
  • Undocumented

    Declaration

    Swift

    public init(_ function: @escaping FunctionType)
  • Undocumented

    Declaration

    Swift

    public func callAsFunction(_ u: U) -> Grade
  • Undocumented

    Declaration

    Swift

    static var zero: `Self` { get }
  • one

    Undocumented

    Declaration

    Swift

    static var one: `Self` { get }

Available where U: Equatable

  • Undocumented

    Declaration

    Swift

    static func fuzzySingleton(_ onlyMember: U) -> MembershipFunction<U>

Available where U: Hashable

  • Undocumented

    Declaration

    Swift

    static func fromCrispSet(_ set: Set<U>) -> MembershipFunction<U>
  • Undocumented

    Declaration

    Swift

    static func fromDictionary(_ dictionary: [U : Grade]) -> MembershipFunction<U>

Available where U == Double