Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FuzzySet"/> class.
        /// </summary>
        /// <param name="state">
        /// The state.
        /// </param>
        /// <param name="function">
        /// The membership function.
        /// </param>
        public FuzzySet(string state, IMembershipFunction function)
        {
            Validate.NotNull(state, nameof(state));
            Validate.NotNull(function, nameof(function));

            this.State    = FuzzyState.Create(state);
            this.function = function;
        }
Пример #2
0
 private static FuzzyState CreateStateFromEnum(Enum @enum)
 {
     return(FuzzyState.Create(@enum.ToString().ToLower()));
 }
Пример #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(string state)
        {
            Validate.NotNull(state, nameof(state));

            return(this.Not(FuzzyState.Create(state)));
        }