Exemplo n.º 1
0
        // -----------------------------------------------------------------------------------------
        /// <!-- 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);
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
 public FuzzyItem(FuzzyMeasure myMeasure, FuzzyTerm term)
 {
     Measure = myMeasure;
     Value   = term;
 }
Exemplo n.º 4
0
 /// <param name="termItem">a fully formed FuzzyTerm</param>
 public void Add(FuzzyTerm termItem)
 {
     _term.Add(termItem);
 }
Exemplo n.º 5
0
 // -----------------------------------------------------------------------------------------
 /// <!-- 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));
 }