public FuzzyTermSet AddSingletonSet(string name, double minBound, double peakPoint, double maxBound)
        {
            AdjustRangetoFit(minBound, maxBound);
            FuzzySet f = new FuzzySet_Singleton(peakPoint);

            MemberSets.Add(name, f);
            return(new FuzzyTermSet(f));
        }
Beispiel #2
0
        //--------------------------- AddSingletonSet ---------------------------------
        //
        //  Adds a singleton to the variable.
        //-----------------------------------------------------------------------------
        /// <summary>
        /// Adds a singleton to the variable.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="minBound"></param>
        /// <param name="peak"></param>
        /// <param name="maxBound"></param>
        /// <returns>Fuzzy set</returns>
        public FzSet AddSingletonSet(string name,
                                     double minBound,
                                     double peak,
                                     double maxBound)
        {
            _memberSets[name] = new FuzzySet_Singleton(peak,
                                                       peak - minBound,
                                                       maxBound - peak);

            AdjustRangeToFit(minBound, maxBound);

            return(new FzSet(_memberSets[name]));
        }