Esempio n. 1
0
        public static FlagsOfCopula makeConjuction()
        {
            FlagsOfCopula result = new FlagsOfCopula();

            result.isConjection = true;
            return(result);
        }
 public static string convToHumanString(this FlagsOfCopula flagsOfCopula)
 {
     if (flagsOfCopula.isInheritance)
     {
         return("-->");
     }
     else if (flagsOfCopula.isSimilarity)
     {
         return("<->");
     }
     else if (flagsOfCopula.isImplication)
     {
         return("==>");
     }
     else if (flagsOfCopula.isEquivalence)
     {
         return("<=>");
     }
     //else if (flagsOfCopula.isConjection) {
     //    return "&&";
     //}
     else
     {
         throw new Exception("Internal error - unimplemented");
     }
 }
Esempio n. 3
0
        public static FlagsOfCopula makeImplication()
        {
            FlagsOfCopula result = new FlagsOfCopula();

            result.nal5       = true;
            result.arrowRight = true;
            return(result);
        }
Esempio n. 4
0
        public static FlagsOfCopula makeInheritance()
        {
            FlagsOfCopula result = new FlagsOfCopula();

            result.nal1or2    = true;
            result.arrowRight = true;
            return(result);
        }
Esempio n. 5
0
        public static FlagsOfCopula makeEquivalence()
        {
            FlagsOfCopula result = new FlagsOfCopula();

            result.nal5       = true;
            result.arrowLeft  = true;
            result.arrowRight = true;
            return(result);
        }
Esempio n. 6
0
        public static FlagsOfCopula makeSimilarity()
        {
            FlagsOfCopula result = new FlagsOfCopula();

            result.nal1or2    = true;
            result.arrowLeft  = true;
            result.arrowRight = true;
            return(result);
        }
Esempio n. 7
0
        public CompoundIndex makeInheritance(string a, string b)
        {
            int termOrCompoundTermOrVariableRefererIdOfA, termOrCompoundTermOrVariableRefererIdOfB;

            TermTupleIndex termTupleIndexOfA = compoundAndTermContext.returnIndexOfTermTupleForHumanReadableTermNameOrCreate(a, out termOrCompoundTermOrVariableRefererIdOfA);
            TermTupleIndex termTupleIndexOfB = compoundAndTermContext.returnIndexOfTermTupleForHumanReadableTermNameOrCreate(b, out termOrCompoundTermOrVariableRefererIdOfB);

            var compoundReferers = new TermOrCompoundTermOrVariableReferer[] {
                compoundAndTermContext.accessTermTupleByIndex(termTupleIndexOfA).refererOrIntervals[0].referer,
                compoundAndTermContext.accessTermTupleByIndex(termTupleIndexOfB).refererOrIntervals[0].referer,
            };

            TermTupleIndex termTupleIndex;

            if (compoundAndTermContext.existTermTuple(compoundReferers))
            {
                termTupleIndex = compoundAndTermContext.getTermTupleIndexByReferers(compoundReferers);
            }
            else
            {
                termTupleIndex = compoundAndTermContext.addTermTupleByReferers(compoundReferers);
            }

            // create compound
            Compound.MakeParameters makeParameters = new Compound.MakeParameters();
            makeParameters.flagsOfCopula   = FlagsOfCopula.makeInheritance();
            makeParameters.termComplexity  = 3;
            makeParameters.termTupleIndex  = termTupleIndex;
            makeParameters.thisTermReferer = TermOrCompoundTermOrVariableReferer.makeNonatomic(compoundAndTermContext.TermOrCompoundTermOrVariableRefererCounter);
            compoundAndTermContext.TermOrCompoundTermOrVariableRefererCounter++;


            Compound      compound      = compoundAndTermContext.createCompound(makeParameters);
            CompoundIndex compoundIndex = compoundAndTermContext.addCompound(compound);


            return(compoundIndex);
        }
Esempio n. 8
0
 static uint getTermComplexityOfCopula(FlagsOfCopula flagsOfCopula)
 {
     return(1);
 }