public static double Membership_Value(FuzzyVar a, double b)
        {
            if (a.MFtype == KieuHam.Triangular)
            {
                return(Membership_Function.Triangular_MF(a.P1, a.P2, a.P3, b));
            }
            if (a.MFtype == KieuHam.RightTrapezoid)
            {
                return(Membership_Function.RightTrapezoid_MF(a.P1, a.P2, b));
            }
            if (a.MFtype == KieuHam.LeftTrapezoid)
            {
                return(Membership_Function.LeftTrapezoid_MF(a.P2, a.P3, b));
            }
            if (a.MFtype == KieuHam.RightLine)
            {
                return(Membership_Function.RightLine_MF(a.P1, a.P2, b));
            }
            if (a.MFtype == KieuHam.LeftLine)
            {
                return(Membership_Function.LeftLine_MF(a.P2, a.P3, b));
            }

            return(0);
        }
Ejemplo n.º 2
0
 //Them bien ngon ngu vao tap mo
 public void Add(FuzzyVar a)
 {
     tenBNN[SoBNN] = a.Name;
     SoBNN++;
 }