Пример #1
0
        public static List <GenericInstantiator.EdgeAggregator> CreateTransitiveSimilarTriangles(SimilarTriangles simTris1, SimilarTriangles simTris2)
        {
            transAnnotation.active = EngineUIBridge.JustificationSwitch.TRANSITIVE_SIMILAR;

            List <GenericInstantiator.EdgeAggregator> newGrounded = new List <GenericInstantiator.EdgeAggregator>();

            // Did either of these congruences come from the other?
            // CTA: We don't need this anymore since use is restricted by class TransitiveSubstitution
            //if (simTris1.HasRelationPredecessor(simTris2) || simTris2.HasRelationPredecessor(simTris1)) return newGrounded;

            // Create the antecedent clauses
            List <GroundedClause> antecedent = new List <GroundedClause>();

            antecedent.Add(simTris1);
            antecedent.Add(simTris2);

            // Create the consequent clause
            Triangle shared = simTris1.SharedTriangle(simTris2);

            AlgebraicSimilarTriangles newAP = new AlgebraicSimilarTriangles(simTris1.OtherTriangle(shared), simTris2.OtherTriangle(shared));

            newGrounded.Add(new GenericInstantiator.EdgeAggregator(antecedent, newAP, transAnnotation));

            return(newGrounded);
        }
Пример #2
0
        public override bool Equals(Object obj)
        {
            AlgebraicSimilarTriangles gst = obj as AlgebraicSimilarTriangles;

            if (gst == null)
            {
                return(false);
            }
            return(base.Equals(obj));
        }
Пример #3
0
        public static List<GenericInstantiator.EdgeAggregator> CreateTransitiveSimilarTriangles(SimilarTriangles simTris1, SimilarTriangles simTris2)
        {
            transAnnotation.active = EngineUIBridge.JustificationSwitch.TRANSITIVE_SIMILAR;

            List<GenericInstantiator.EdgeAggregator> newGrounded = new List<GenericInstantiator.EdgeAggregator>();

            // Did either of these congruences come from the other?
            // CTA: We don't need this anymore since use is restricted by class TransitiveSubstitution
            //if (simTris1.HasRelationPredecessor(simTris2) || simTris2.HasRelationPredecessor(simTris1)) return newGrounded;

            // Create the antecedent clauses
            List<GroundedClause> antecedent = new List<GroundedClause>();
            antecedent.Add(simTris1);
            antecedent.Add(simTris2);

            // Create the consequent clause
            Triangle shared = simTris1.SharedTriangle(simTris2);

            AlgebraicSimilarTriangles newAP = new AlgebraicSimilarTriangles(simTris1.OtherTriangle(shared), simTris2.OtherTriangle(shared));

            newGrounded.Add(new GenericInstantiator.EdgeAggregator(antecedent, newAP, transAnnotation));

            return newGrounded;
        }