public static List<GenericInstantiator.EdgeAggregator> CreateTransitiveProportion(ProportionalAngles pss, CongruentAngles conAngs) { List<GenericInstantiator.EdgeAggregator> newGrounded = new List<GenericInstantiator.EdgeAggregator>(); //// Did either of these proportions come from the other? //if (pss.HasRelationPredecessor(conAngs) || conAngs.HasRelationPredecessor(pss)) return newGrounded; // // Create the antecedent clauses // List<GroundedClause> antecedent = new List<GroundedClause>(); antecedent.Add(pss); antecedent.Add(conAngs); // // Create the consequent clause // Angle shared = pss.AngleShared(conAngs); AlgebraicProportionalAngles newPS = new AlgebraicProportionalAngles(pss.OtherAngle(shared), conAngs.OtherAngle(shared)); // Update relationship among the congruence pairs to limit cyclic information generation //newPS.AddPredecessor(pss); //newPS.AddPredecessor(conAngs); newGrounded.Add(new GenericInstantiator.EdgeAggregator(antecedent, newPS, propAnnotation)); return newGrounded; }
// // Compare the numeric proportion between the relations // public bool ProportionallyEquals(ProportionalAngles that) { if (this.proportion.Key == -1 && this.proportion.Value == -1) { return Utilities.CompareValues(this.dictatedProportion, that.dictatedProportion); } return this.proportion.Key == that.proportion.Key && this.proportion.Value == that.proportion.Value; }