public static NameRmsedNumeralVector operator -(NameRmsedNumeralVector left, double right) { var result = new NameRmsedNumeralVector(); foreach (var item in left) { result[item.Key] = item.Value - right; } return(result); }
public static NameRmsedNumeralVector operator -(double left, NameRmsedNumeralVector right) { var result = new NameRmsedNumeralVector(); foreach (var item in right) { result[item.Key] = left - item.Value; } return(result); }
/// <summary> /// 获取四舍五入值,RMS默认为0 /// </summary> /// <returns></returns> public new NameRmsedNumeralVector GetRound() { var result = new NameRmsedNumeralVector(); foreach (var item in this.Data) { result[item.Key] = new RmsedNumeral(Math.Round(item.Value.Value), 1e-20); } return(result); }
public static NameRmsedNumeralVector operator -(NameRmsedNumeralVector left, NameRmsedNumeralVector right) { var result = new NameRmsedNumeralVector(); foreach (var item in left) { if (!right.Data.ContainsKey(item.Key)) { continue; } result[item.Key] = item.Value - right[item.Key]; } return(result); }