AddSetShoulder() public method

Add Set Shoulder
public AddSetShoulder ( string setName, double alphaCut, double ptBeg, double ptEnd, EnumFuzzySetDirection setDir ) : void
setName string
alphaCut double
ptBeg double
ptEnd double
setDir EnumFuzzySetDirection
return void
Example #1
0
        /// <summary>
        /// Create a Shoulder
        /// </summary>
        /// <param name="vFuzzyVar"></param>
        /// <param name="vsXml"></param>
        private void CreateShoulder(ContinuousFuzzyRuleVariable vFuzzyVar, string vsXml)
        {
            XmlTextReader reader = new XmlTextReader(new StringReader(vsXml));
            reader.Read();

            string sName = reader.GetAttribute("name");
            float fAlpha = float.Parse(reader.GetAttribute("alpha"));
            float fStart = float.Parse(reader.GetAttribute("start"));
            float fEnd = float.Parse(reader.GetAttribute("end"));
            //left = 1, right = 2
            EnumFuzzySetDirection eType = (EnumFuzzySetDirection)int.Parse(reader.GetAttribute("type"));
            vFuzzyVar.AddSetShoulder(sName, fAlpha, fStart, fEnd, eType);
            reader.Close();
        }