예제 #1
0
        internal FuzzySet moRhs; // Righthand side value

        #endregion Fields

        #region Constructors

        /// <summary> Creates a new fuzzy clause with the specified lvalue, operator, and
        /// rvalue.
        /// 
        /// </summary>
        /// <param name="lhs">the FuzzyRuleVariable which is the lvalue
        /// </param>
        /// <param name="op">the integer operator
        /// </param>
        /// <param name="rhs">the FuzzySet which is the rvalue
        /// </param>
        protected internal FuzzyClause(FuzzyRuleVariable lhs, EnumFuzzyOperator op, FuzzySet rhs)
        {
            this.moLhs = lhs;
            this.meOp = op;
            this.moRhs = rhs;
            mbConsequent = (op == EnumFuzzyOperator.Assign);
        }
예제 #2
0
        /// <summary>
        /// Crate the Clause
        /// </summary>
        /// <param name="lhs">Left Hand Side</param>
        /// <param name="oper">Operator</param>
        /// <param name="hedges">Hedges</param>
        /// <param name="setName">Set Name</param>
        /// <returns>FuzzyClause</returns>
        public FuzzyClause CreateClause(ContinuousFuzzyRuleVariable lhs, EnumFuzzyOperator oper, string hedges, string setName)
        {
            // Retrieve the fuzzy set object based on hedges and setName
            FuzzySet rhs = GetFuzzySet(lhs, setName, hedges);

            // Create a clause to place into a rule.
            FuzzyClause clause = new FuzzyClause(lhs, oper, rhs);

            return clause;
        }