?? fuzzyterm.cs
字號:
/*
*
* fuzzynet: Fuzzy Logic Library for Microsoft .NET
* Copyright (C) 2008 Dmitry Kaluzhny (kaluzhny_dmitrie@mail.ru)
*
* */
using System;
using System.Collections.Generic;
namespace AI.Fuzzy.Library
{
/// <summary>
/// Linguistic term
/// </summary>
public class FuzzyTerm
{
string _name;
IMembershipFunction _mf;
/// <summary>
/// Constructor
/// </summary>
/// <param name="name">Term name</param>
/// <param name="var">Linguistic variable to which the term belongs</param>
/// <param name="mf">Membership function initially associated with the term</param>
public FuzzyTerm(string name, IMembershipFunction mf)
{
if (RuleParser.IsValidName(name))
{
throw new ArgumentException("Invalid term name.");
}
_name = name;
_mf = mf;
}
/// <summary>
/// Membership function initially associated with the term
/// </summary>
public IMembershipFunction MembershipFunction
{
get { return _mf; }
}
/// <summary>
/// Name of the term
/// </summary>
public string Name
{
set
{
if (RuleParser.IsValidName(value))
{
throw new ArgumentException("Invalid term name.");
}
_name = value;
}
get
{
return _name;
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -