|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FuzzyFramework.Dimensions;
using FuzzyFramework.Intervals;
namespace FuzzyFramework.Defuzzification
{
/// <summary>
/// Defuzzifies the output set using defuzzifioncation method Right-Of-Maximum
/// </summary>
public class RightOfMaximum : Defuzzification
{
public RightOfMaximum(FuzzyRelation relation, Dictionary<IDimension, System.Decimal> inputs)
: base(relation, inputs)
{
}
public override decimal CrispValue
{
get
{
IntervalSet functionCourse = Relation.GetFunction(this._inputs, this._outputDimension);
ConstantInterval[] maximas = functionCourse.Maximum;
if (maximas.Length == 0) throw new ApplicationException("No maximas found.");
return maximas[maximas.Length - 1].UpperBoundary;
}
}
public override double MembershipDegree
{
get
{
IntervalSet functionCourse = Relation.GetFunction(this._inputs, this._outputDimension);
ConstantInterval[] maximas = functionCourse.Maximum;
if (maximas.Length == 0) throw new ApplicationException("No maximas found.");
return maximas[maximas.Length - 1].Value;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.