private static FuzzyState CreateStateFromEnum(Enum @enum) { return(FuzzyState.Create(@enum.ToString().ToLower())); }
/// <summary> /// Returns a <see cref="FuzzySet"/> with a state which matches the given state. /// </summary> /// <param name="state"> /// The state. /// </param> /// <returns> /// The <see cref="FuzzySet"/>. /// </returns> public FuzzySet GetSet(FuzzyState state) { Validate.NotNull(state, nameof(state)); return(this.fuzzySets[state]); }
/// <summary> /// Returns a proposition based on whether the variable IS NOT in the given state. /// </summary> /// <param name="state"> /// The state. /// </param> /// <returns> /// The <see cref="Proposition"/>. /// </returns> public Proposition Not(FuzzyState state) { return(new Proposition(this, LogicOperators.IsNot(), state)); }
/// <summary> /// Evaluates whether the given state is a member of the <see cref="LinguisticVariable"/>. /// </summary> /// <param name="state"> /// The state. /// </param> /// <returns> /// A <see cref="bool"/>. /// </returns> public bool IsMember(FuzzyState state) { Validate.NotNull(state, nameof(state)); return(this.fuzzySets.ContainsKey(state)); }
/// <summary> /// Returns a proposition based on whether the variable IS NOT in the given state. /// </summary> /// <param name="state"> /// The state. /// </param> /// <returns> /// The <see cref="Proposition"/>. /// </returns> public Proposition Not(string state) { Validate.NotNull(state, nameof(state)); return(this.Not(FuzzyState.Create(state))); }