2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-09-14 04:53:17 +00:00
This commit is contained in:
2022-10-29 17:53:06 +03:00
parent a645946a18
commit 584cd458de
15 changed files with 499 additions and 4 deletions

View File

@@ -0,0 +1,28 @@
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;
}
}
}