The paper deals with a generalized relational tensor, a novel discrete structure to store information about a time series, and algorithms (1) to fill the structure, (2) to generate a time series from the structure, and (3) to predict a time series, for both regularly and irregularly sampled time series. The algorithms combine the concept of generalized z-vectors with ant colony optimization techniques. In order to estimate quality of the storing/re-generating procedure, a difference between characteristics of the initial and regenerated time series is used. The structure allows working with a multivariate time series, with an irregularly sampled time series, and with a number of series as well. For chaotic time series, a difference between characteristics of the initial time series (the highest Lyapunov exponent, the auto-correlation function) and those of the time series re-generated from a structure is used to assess the effectiveness of the algorithms in question. The approach has shown fairly good results for periodic and benchmark chaotic time series and satisfactory results for real-world chaotic data.