FuzzyLogicController
open class FuzzyLogicController<AntecedentUniverse, ConsequentUniverse>
Undocumented
-
Undocumented
Declaration
Swift
public var settings: OperationSettings
-
Undocumented
Declaration
Swift
public var ruleBase: FuzzyRuleBase<(AntecedentUniverse, ConsequentUniverse)>
-
Undocumented
Declaration
Swift
public init( rules: FuzzyRuleBase<(AntecedentUniverse, ConsequentUniverse)> = .init(), settings: OperationSettings = .init(), aggregatorFunction: ((Grade, Grade) -> Grade)? = nil )
-
Undocumented
Declaration
Swift
open func consequence<S: Sequence>( usingFact fact: IterableFuzzySet<AntecedentUniverse, S> ) -> AnyFuzzySet<ConsequentUniverse>
-
Apply generalized Modus Ponens to all rules using
fact
as input to the controller and return the grade membership ofvalue
in the fuzzy set output.Declaration
Swift
open func consequenceGrade<S: Sequence>( for value: ConsequentUniverse, usingFact fact: IterableFuzzySet<AntecedentUniverse, S> ) -> Grade
-
Apply generalized Modus Ponens to all rules using
fact
as input to the controller and return the grade membership ofvalue
in the fuzzy set output.Helper for the scenario when
AntecedentUniverse
does not conform toEquatable
. One such example might be having a tuple as a universe of discourse - they still do not conform toEquatable
, even if all of their elements areEquatable
.Declaration
Swift
open func consequenceGrade( for value: ConsequentUniverse, usingSingletonFact fact: AntecedentUniverse ) -> Grade