Hi all,
[input]
array of size n
window size: int
overlapvar : int
we have to read elements from array as per window size, and from next iteration we have to introduce overlap factor too. i.e if there are 11 elements X1,...X11. with window size = 3, and overlap which will be less than window size, so it can be either 0,1,2 in above case. so we will be reading array as follows:
x1,x2,x3
x2,x3,x4,
x3,x4,x5,
x4,x5,x6,
x5,x6,x7,
x8,x9,x10,
x9,x10,x11
taking window size = 3 and overlap as 2. No. of iterations: (sizeofarray-windowsize/windowsize-overlap)+1;
Now the problem is if sizeof array is 10 and winsize = 3, and overlap = 1, and no of iterations will be 4 with full window size
x1,x2,x3,
x3,x4,x5,
x5,x6,x7,
x7,x8,x9,
x9,x10
so we left x9 and x10. so we have to detect which no of elements were left and have to use them directly, (in my cases these x9 and x10 are file pointers).
Hope for a answer on the same.
Thanks in Advance.
rakesh
