예제 #1
0
 private void start_Click(object sender, EventArgs e)
 {
     col   = new universum(colUniversum);
     plus  = new context(plusDG);
     minus = new context(minusDG);
     tao   = new context(taoDG);
     context[] conts = { plus, minus, tao };
     row[0] = new universum(plusU);
     row[1] = new universum(minusU);
     row[2] = new universum(taoU);
     for (int i = 0; i < 3; i++)
     {
         conts[i].uColumn = col;
         conts[i].setUniversForSS(col);
         conts[i].uRow = row[i];
     }
     colUniversum.Enabled = false;
     //plusDG.Enabled = false;
     //minusDG.Enabled = false;
     //taoDG.Enabled = false;
     plusU.Enabled  = false;
     minusU.Enabled = false;
     taoU.Enabled   = false;
     JSM            = new JSM(conts);
     c1.Hide();
     p1.Hide();
     m1.Hide();
     t1.Hide();
     createButton.Hide();
     JSM.toDGV(r1, r2, r3);
 }
예제 #2
0
 private bool relCanon(context cont, int ind, smallSet Y, smallSet z)
 {
     for (int i = 0; i < ind; i++)
     {
         if (!Y[i] && (z * cont[i]) == z)
         {
             return(false);
         }
     }
     return(true);
 }
예제 #3
0
 public JSM(context[] cont)
 {
     plus         = cont[0];
     minus        = cont[1];
     TAO          = cont[2];
     plusExample  = Norris(plus);
     minusExample = Norris(minus);
     Filter(plusExample);
     Filter(minusExample);
     Kernel();
 }
예제 #4
0
 private bool canon(context cont, int ind)
 {
     for (int i = 0; i < ind; i++)
     {
         if ((cont[ind] * cont[i]) == cont[ind])
         {
             return(false);
         }
     }
     return(true);
 }
예제 #5
0
        private void button4_Click(object sender, EventArgs e)
        {
            u    = new universum(dataGridView4);
            u1   = new universum(dataGridView5);
            cont = new context(dataGridView6);

            cont.uColumn = u;
            cont.uRow    = u1;
            //cont.uColumn = u1; הכ� �מננטסא
            //cont.uRow = u; הכ� �מננטסא
            dataGridView4.Enabled = false;
            dataGridView5.Enabled = false;
            textBox4.Hide();
            button3.Hide();
        }
예제 #6
0
        private List <concept> Norris(context cont)
        {
            List <concept> L;

            L = new List <concept>();
            int n = cont.uRow.uni;

            for (int i = 0; i < cont.uRow.uni; i++)
            {
                concept x = new concept(cont[i], i);
                x.Intens.univers = cont.uRow;
                x.Extens.univers = cont.uColumn;
                if (L.Count != 0)
                {
                    for (int j = 0; j < L.Count; j++)
                    {
                        if (L[j] <= x)
                        {
                            concept c = new concept(L[j].Extens, L[j].Intens + x.Intens);
                            L[j] = c;
                        }
                        else
                        {
                            smallSet z = L[j].Extens * x.Extens;
                            if (relCanon(cont, i, L[j].Intens, z))
                            {
                                concept c = new concept(z, L[j].Intens + x.Intens);
                                L.Add(c);
                            }
                        }
                    }
                }
                if (canon(cont, i))
                {
                    L.Add(x);
                }
            }
            return(L);
        }