Exemplo n.º 1
0
Arquivo: Form1.cs Projeto: jbenua/JSM
 private void AddToListOfConcepts(int ind, List<Concept> L, List<SmallSet> u)
 {
     int n = L.Count;
     for (int i = 0; i < n; i++)
     {
         if (L[i].Int <= u[ind])
         {
             Concept c = L[i];
             SmallSet a = new SmallSet(ind);
             c.Ext = L[i].Ext + a;
             L[i] = c;
         }
         else
         {
             SmallSet z = L[i].Int * u[ind];
             if (RelCanonic(ind, u, L[i].Ext, z))
             {
                 Concept c = new Concept();
                 SmallSet a = new SmallSet(ind);
                 c.Ext = L[i].Ext + a;
                 c.Int = z;
                 L.Add(c);
             }
         }
     }
     if (Canonic(ind, u))
     {
         Concept c = new Concept();
         SmallSet a = new SmallSet(ind);
         c.Ext = a;
         c.Int = u[ind];
         L.Add(c);
     }
 }
Exemplo n.º 2
0
Arquivo: Form1.cs Projeto: jbenua/JSM
 private string concept_toString(Concept a, Context c)
 {
     string b = "<{";
     for (int i = 0; i < c.unAtr.Count; i++)
         if (a.Ext[i] == true)
             b += c.unAtr[i] + " ";
     b+= "}, {";
     for (int i = 0; i < c.unObj.Count; i++)
         if (a.Int[i] == true)
             b += c.unObj[i] + " ";
     b+="}>";
     return b;
 }