示例#1
0
 /// <summary>
 /// Divide operator - runs through every combination of
 /// items in the two sets and performs a divide operation on
 /// them; and then puts the result in a new distinct set.
 /// </summary>
 /// <param name="rhs">Right hand side set</param>
 /// <returns>Result of the division of the two sets</returns>
 public Set <T> Divide(Set <T> rhs) =>
 new Set <T>((from y in rhs.AsEnumerable()
              from x in this.AsEnumerable()
              select TypeDesc.Divide(x, y, TypeDesc <T> .Default)), true);
示例#2
0
 public Set <T> Product(Set <T> rhs) =>
 new Set <T>((from x in this.AsEnumerable()
              from y in rhs.AsEnumerable()
              select TypeDesc.Product(x, y, TypeDesc <T> .Default)).Distinct());