Пример #1
0
 private static FuzzyState CreateStateFromEnum(Enum @enum)
 {
     return(FuzzyState.Create(@enum.ToString().ToLower()));
 }
Пример #2
0
        /// <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]);
        }
Пример #3
0
 /// <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));
 }
Пример #4
0
        /// <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));
        }
Пример #5
0
        /// <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)));
        }