// -----------------------------------------------------------------------------------------
        /// <!-- BestTerm -->
        /// <summary>
        ///      Returns the most truthful term in the set
        /// </summary>
        /// <param name="measure"></param>
        /// <returns></returns>
        /// <remarks></remarks>
        public FuzzyTerm BestTerm(double measure)
        {
            FuzzyTerm found = new FuzzyTerm("dummy");
            double    truth = 0.0;

            foreach (FuzzyTerm item in _term)
            {
                if ((item.TruthValue(measure) > truth))
                {
                    truth = item.TruthValue(measure);
                    found = item.Copy();
                }
            }
            return(found);
        }
 public FuzzyItem(FuzzyMeasure myMeasure, FuzzyTerm term)
 {
     Measure = myMeasure;
     Value   = term;
 }
 /// <param name="termItem">a fully formed FuzzyTerm</param>
 public void Add(FuzzyTerm termItem)
 {
     _term.Add(termItem);
 }
 // -----------------------------------------------------------------------------------------
 /// <!-- Best -->
 /// <summary>
 ///      Returns the most truthful term in the set along with its truth value
 /// </summary>
 /// <param name="measure"></param>
 /// <param name="term">replaces this with the best term</param>
 /// <returns>The best term's truth value</returns>
 /// <remarks></remarks>
 public double Best(double measure, ref FuzzyTerm term)
 {
     term = BestTerm(measure);
     return(BestTruthValue(measure));
 }
Example #5
0
        // -----------------------------------------------------------------------------------------
        /// <!-- Copy -->
        /// <summary>
        ///      Provides a copy of the fuzzy term
        /// </summary>
        /// <returns></returns>
        /// <remarks></remarks>
        public FuzzyTerm Copy()
        {
            FuzzyTerm newFuzzy = new FuzzyTerm(_term, Lowest, Low, High, Highest);

            return(newFuzzy);
        }