AddSetTrapezoid() public method

Add the Trapezoid Set
public AddSetTrapezoid ( string setName, double alphaCut, double ptLeft, double ptLeftCore, double ptRightCore, double ptRight ) : void
setName string
alphaCut double
ptLeft double
ptLeftCore double
ptRightCore double
ptRight double
return void
Example #1
0
        /// <summary>
        /// Create a Trapezoid
        /// </summary>
        /// <param name="vFuzzyVar"></param>
        /// <param name="vsXml"></param>
        private void CreateTrapezoid(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 fLeft = float.Parse(reader.GetAttribute("left"));
            float fLeftCore = float.Parse(reader.GetAttribute("leftcore"));
            float fRight = float.Parse(reader.GetAttribute("right"));
            float fRightCore = float.Parse(reader.GetAttribute("rightcore"));

            vFuzzyVar.AddSetTrapezoid(sName, fAlpha, fLeft, fLeftCore, fRightCore, fRight);
            reader.Close();
        }