public TermData subtract(TermData t1, TermData t2) {if (t2 == NO_OUTPUT) {return t1;}TermData ret;if (statsEqual(t1, t2) && bytesEqual(t1, t2)) {ret = NO_OUTPUT;} else {ret = new TermData(t1.bytes, t1.docFreq, t1.totalTermFreq);}return ret;}
public override TermData Subtract(TermData t1, TermData t2){if (Equals(t2, NO_OUTPUT))return t1;Debug.Assert(t1.longs.Length == t2.longs.Length);int pos = 0;long diff = 0;var share = new long[_longsSize];while (pos < _longsSize){share[pos] = t1.longs[pos] - t2.longs[pos];diff += share[pos];pos++;}TermData ret;if (diff == 0 && StatsEqual(t1, t2) && BytesEqual(t1, t2)){ret = NO_OUTPUT;}else{ret = new TermData(share, t1.bytes, t1.docFreq, t1.totalTermFreq);}return ret;}