示例#1
0
 public Form1()
 {
     InitializeComponent();
     //     public
     testMf        = new FuzzyMemberFcn(4f, 6f);
     basicVariable = new FuzzyVariable(3, 2f, 5f);
 }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //mftri
            //  FuzzyMemberFcn testMf;
            float temp1 = float.Parse(textBox1.Text);
            float temp2 = float.Parse(textBox2.Text);
            float temp3 = float.Parse(textBox3.Text);

            float[] tempPar = new float[] { temp1, temp2,
                                            temp3 };
            testMf = new FuzzyMemberFcn(tempPar, mfShape.tri);
        }
示例#3
0
        public FuzzyVariable(int quantMf, float min, float max)
        {
            memberFunctions = new FuzzyMemberFcn[quantMf];
            if (quantMf == 1)
            {
                memberFunctions[0] = new FuzzyMemberFcn((max + min) / 2f, (max + min) / 2f);
            }
            else
            {
                for (int i = 0; i < quantMf; i++)
                {
                    memberFunctions[i] = new FuzzyMemberFcn(min + i * (max - min) / (quantMf - 1), (max - min) / (quantMf - 1));
                }
            }

            //{ new FuzzyMemberFcn(), new FuzzyMemberFcn(),
            //new FuzzyMemberFcn()};
            //memberFunctions[0].shift(-0.5f);
            //memberFunctions[2].shift(0.5f);
        }
示例#4
0
 private void button3_Click(object sender, EventArgs e)
 {
     //mftrap
     testMf = new FuzzyMemberFcn(new float[] { float.Parse(textBox1.Text), float.Parse(textBox2.Text),
                                               float.Parse(textBox3.Text), float.Parse(textBox4.Text) }, mfShape.trap);
 }