SlidingWindow
Sliding windows are used to hold the N most recent samples of a data stream.
Example
use *;
use *;
// Create a SlidingWindow with a window size of 4 elements
let mut sw: = new;
// Insert some data
sw.insert;
sw.insert;
sw.insert;
sw.insert;
// The 0 index always returns the oldest element in the window
assert_eq!;
// When full, inserting a new element removes and returns the oldest
assert_eq!;