Ejemplo n.º 1
0
        /// <summary>
        /// 신뢰도 구하기
        /// </summary>
        /// <param name="kind">구하고 싶은 퍼지</param>
        /// <returns></returns>
        private float GetReliability(Membership kind)
        {
            float resultVal = 0f;

            for (int i = 0; i < rules.Length; i++)
            {
                var rstKind = (Membership)((int)rules[i].result + (int)this.df_FuzzyRule);
                if (rstKind == kind)
                {
                    resultVal = FuzzyCommon.OR(resultVal, rules[i].ExcuteCalculate());
                }
            }
            return(resultVal);
        }
Ejemplo n.º 2
0
        public float ExcuteCalculate()
        {
            float resultVal = 0f;

            switch (calculate)
            {
            case Calculate.AND:
                resultVal = FuzzyCommon.AND(v1.GetEvaluate(), v2.GetEvaluate());
                break;

            case Calculate.OR:
                resultVal = FuzzyCommon.OR(v1.GetEvaluate(), v2.GetEvaluate());
                break;
            }
            return(resultVal);
        }