static public AASimilarity GetInstance(string similarity)
 {
     if (similarity == "Eq")
     {
         EqClassDefinitions aEqClassDefinitions = new EqClassDefinitions();
         aEqClassDefinitions.Name = similarity;
         aEqClassDefinitions.EqClassCollection = EqClassDefinitions.GetEqClassCollection();
         return(aEqClassDefinitions);
     }
     else
     {
         HowConsevered howConsevered;
         if (similarity == "Con")
         {
             howConsevered = HowConsevered.Conserved;
         }
         else
         {
             Debug.Assert(similarity == "Semi");
             howConsevered = HowConsevered.SemiConserved;
         }
         AASimilarity aaSimilarity = TangriEtAl.GetInstance(howConsevered);
         return(aaSimilarity);
     }
 }
Esempio n. 2
0
        public void AppendCanGoToSet(char c, AASimilarity aaSimilarity)
        {
            SpecialFunctions.CheckCondition(char.IsUpper(c)); //!!!raise error
            string sCanGoToSet = aaSimilarity.CanGoToSet(c);

            sbCurrentDisjunct.AppendGroundSet(sCanGoToSet);
            ++CoreLengthSoFar;
        }