public static EnumKey From <T>(T value) where T : struct, System.IConvertible { FuzzyUtils.IsGenericParameterValid <T>(); EnumKey key = new EnumKey(); key.typeHash = typeof(T).GetHashCode(); key.valueHash = EnumInt32ToInt.Convert(value); return(key); }
private void Initialize() { FuzzyUtils.IsGenericParameterValid <T>(); this.duplicateOutputs = new Dictionary <EnumKey, List <FuzzyValue <T> > >(); this.outputEnumValues = FuzzyUtils.GetEnumValues <T>(); for (int i = 0; i < this.outputEnumValues.Length; i++) { this.duplicateOutputs.Add(EnumKey.From(this.outputEnumValues[i]), new List <FuzzyValue <T> >(10)); } }
public RuleEvaluator() { FuzzyUtils.IsGenericParameterValid <T>(); }
public MaxAvDefuzzer() { FuzzyUtils.IsGenericParameterValid <T>(); this.outputEnumValues = FuzzyUtils.GetEnumValues <T>(); }
public FuzzyValue(T lingVar, float degree) { FuzzyUtils.IsGenericParameterValid <T>(); this.linguisticVariable = lingVar; this.membershipDegree = degree; }