2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-05-06 11:32:59 +00:00
2022-10-29 17:53:06 +03:00

29 lines
723 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Analysis.Fuzzy
{
public class FuzzyRule
{
public string Name { get; set; }
public FuzzySet InputSet { get; set; }
public FuzzySet OutputSet { get; set; }
public FuzzyRule(string name, FuzzySet input, FuzzySet output)
{
Name = name;
InputSet = input;
OutputSet = output;
}
public FuzzySet Evaluate(double input)
{
var val = InputSet[input];
var results = new FuzzySet(OutputSet.Function) { AlphaCut = OutputSet.AlphaCut < val ? OutputSet.AlphaCut : val };
return results;
}
}
}