コード例 #1
0
        internal NodeFuzzyRelation( FuzzyRelation subrelation1, FuzzyRelation subrelation2, IOperator oper)
        {
            if (
                subrelation1 == null ||
                //subrelation2 == null ||
                oper == null)
                throw new ArgumentNullException();

            _subrelation1 = subrelation1;
            _subrelation2 = subrelation2;
            _operator = oper;
            subrelation1.Parent = this;
            if (subrelation2 !=null)
                subrelation2.Parent = this;
        }
コード例 #2
0
        internal NodeFuzzyRelation(FuzzyRelation subrelation1, FuzzyRelation subrelation2, IOperator oper)
        {
            if (
                subrelation1 == null ||
                //subrelation2 == null ||
                oper == null)
            {
                throw new ArgumentNullException();
            }

            _subrelation1       = subrelation1;
            _subrelation2       = subrelation2;
            _operator           = oper;
            subrelation1.Parent = this;
            if (subrelation2 != null)
            {
                subrelation2.Parent = this;
            }
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: patrick-huyphan/fuzzyDemo
        protected Defuzzification deFuzzy(FuzzyRelation relation, decimal inputMACD, decimal inputRSI, decimal inputSO, decimal inputOBV)
        {
            Defuzzification result = new MeanOfMaximum(
                relation,
                new Dictionary<IDimension, decimal>{
                    { MACD, inputMACD },
                    { RSI, inputRSI },
                    { SO, inputSO },
                    { OBV, inputOBV }
                }
            );

            return result;
        }