⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fuzzyterm.cs

📁 在.net环境下用C#开发的模糊控制函数库
💻 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 + -