def _construct_all_SAX_chunk_dict(self):
lag_dicts = {}<EOL>fut_dicts = {}<EOL>length = self.time_series_length<EOL>lws = self.lag_window_size<EOL>fws = self.future_window_size<EOL>chunk_size = self.chunk_size<EOL>for i in range(length):<EOL><INDENT>if i < lws or i > length - fws:<EOL><INDENT>lag_dicts[i] = None<EOL><DEDENT>else:<EOL><INDENT>if lag_dicts[i - <NUM_LIT:1>] is None:<EOL><INDENT>lag_dict = self._construct_SAX_chunk_dict(self.sax[i - lws: i])<EOL>lag_dicts[i] = lag_dict<EOL>lw_leave_chunk = self.sax[<NUM_LIT:0>:chunk_size]<EOL>lw_enter_chunk = self.sax[i - chunk_size + <NUM_LIT:1>: i + <NUM_LIT:1>]<EOL>fut_dict = self._construct_SAX_chunk_dict(self.sax[i: i + fws])<EOL>fut_dicts[i] = fut_dict<EOL>fw_leave_chunk = self.sax[i: i + chunk_size]<EOL>fw_enter_chunk = self.sax[i + fws + <NUM_LIT:1> - chunk_size: i + fws + <NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>lag_dict = copy(lag_dicts[i - <NUM_LIT:1>])<EOL>lag_dict[lw_leave_chunk] -= <NUM_LIT:1><EOL>lag_dict[lw_enter_chunk] += <NUM_LIT:1><EOL>lag_dicts[i] = lag_dict<EOL>fut_dict = copy(fut_dicts[i - <NUM_LIT:1>])<EOL>fut_dict[fw_leave_chunk] -= <NUM_LIT:1><EOL>fut_dict[fw_enter_chunk] += <NUM_LIT:1><EOL>fut_dicts[i] = fut_dict<EOL>lw_leave_chunk = self.sax[i - lws: i - lws + chunk_size]<EOL>lw_enter_chunk = self.sax[i - chunk_size + <NUM_LIT:1>: i + <NUM_LIT:1>]<EOL>fw_leave_chunk = self.sax[i: i + chunk_size]<EOL>fw_enter_chunk = self.sax[i + fws + <NUM_LIT:1> - chunk_size: i + fws + <NUM_LIT:1>]<EOL><DEDENT><DEDENT><DEDENT>self.lag_dicts = lag_dicts<EOL>self.fut_dicts = fut_dicts<EOL>
Construct the chunk dicts for lagging window and future window at each index.
 e.g: Suppose we have a SAX sequence as '1234567890', both window sizes are 3, and the chunk size is 2.
 The first index that has a lagging window is 3. For index equals 3, the lagging window has sequence '123',
 the chunk to leave lagging window(lw_leave_chunk) is '12', and the chunk to enter lagging window(lw_enter_chunk) is '34'.
 Therefore, given chunk dicts at i, to compute chunk dicts at i+1, simply decrement the count for lw_leave_chunk,
 and increment the count for lw_enter_chunk from chunk dicts at i. Same method applies to future window as well.