public void Send(Weighted <R> record) { Logging.Info("[BMRS {1}] Sending record: {0}", record, this.name); long value = 0; bool exists = this.lastEpochAccumulation.TryGetValue(record.record, out value); if (exists && value + record.weight == 0) { this.lastEpochAccumulation.Remove(record.record); } else { this.lastEpochAccumulation[record.record] = value + record.weight; } }
private void DeferredSend(Weighted <R> record) { if (record.weight < 0) { for (int i = 0; i < -record.weight; ++i) { this.collection.Remove(record.record); } } else { for (int i = 0; i < record.weight; ++i) { this.collection.Add(record.record); } } }
public void Send(Weighted <R> record) { Console.Error.WriteLine("Got!: {0}", record); this.buffer.Add(record); }
public void Send(Weighted <R> record) { Debug.Assert(record.weight == -1 || record.weight == 1); this.buffer.Add(record); }
public bool Equals(Weighted <T> that) { return(this.weight == that.weight && this.record.Equals(that.record)); }
public void OnCompleted(Weighted <R> value) { inputVertex.OnCompleted(value); }
internal static NaiadRecord <S, T> ToNaiadRecord <S, T>(this Weighted <S> x, T t) where S : IEquatable <S> where T : Time <T> { return(new NaiadRecord <S, T>(x.record, x.weight, t)); }