Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class RRQueue : Queue<double>
- {
- public int capacity;
- public RRQueue(int _capacity)
- {
- capacity = _capacity;
- }
- public new void Enqueue(double item)
- {
- base.Enqueue(item);
- if (this.Count > capacity) this.Dequeue();
- }
- public double Average
- {
- get
- {
- return this.Average();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement