示例#1
0
 public static WeightSum operator -(WeightSum a, Weight b) =>
 a.count == 1
         ? WeightSum.Zero()
         : (b.IsInfinity
             ? new WeightSum(a.count - 1, a.infCount - 1, a.sum)
             : new WeightSum(a.count - 1, a.infCount, Weight.AbsoluteDifference(a.sum, b)));