Ejemplo n.º 1
0
        public FuzzySet Union(FuzzySet b)
        {
            var FuzzySet = new List <Tuple <Double, Double> >();

            for (int i = 0; i < this.Length(); i++)
            {
                if (Math.Abs(this.mSet[i].Item1 - b.mSet[i].Item1) > 0.01)
                {
                    throw new Exception("Elements not match");
                }
                FuzzySet.Add(new Tuple <Double, Double>(this.mSet[i].Item1, Math.Max(this.mSet[i].Item2, b.mSet[i].Item2)));
            }

            return(new FuzzySet(FuzzySet));
        }
Ejemplo n.º 2
0
        private void CalculateSets(FuzzyModel data)
        {
            CreateFuzzySets(data);
            if (qualifierNumber > 0)
            {
                qualifierSet        = ModifySet(qualifierParam, qualifierSet);
                combineQualifierSet = CombineSet(qualifierParam, qualifierSet);
            }

            summarizerSet        = ModifySet(summarizerParam, summarizerSet);
            combineSummarizerSet = CombineSet(summarizerParam, summarizerSet);

            if (qualifierNumber > 0)
            {
                combineSet = combineSummarizerSet.Intersection(combineQualifierSet);
            }
            else
            {
                combineSet = combineSummarizerSet;
            }
        }