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); }
public override bool Equals(Object obj) { AlgebraicSimilarTriangles gst = obj as AlgebraicSimilarTriangles; if (gst == null) { return(false); } return(base.Equals(obj)); }
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; }