(Multilevel) Toeplitz Class

class fastmat.Toeplitz

Bases: Partial

This class provides a very general implementation of Toeplitz matrices, which essentially realize a (possibly multidimensional) non-circular convolution.

This type of matrix is highly structured. A two-level Toeplitz Matrix looks like:

>>> t_00 t_05 t_04 t_03   t_40 t_45 t_44 t_43   t_30 t_35 t_34 t_33
>>> t_01 t_00 t_05 t_04   t_41 t_40 t_45 t_44   t_31 t_30 t_35 t_34
>>> t_02 t_01 t_00 t_05   t_42 t_41 t_40 t_45   t_32 t_31 t_30 t_35
>>>
>>> t_10 t_15 t_14 t_13   t_00 t_05 t_04 t_03   t_40 t_45 t_44 t_43
>>> t_11 t_10 t_15 t_14   t_01 t_00 t_05 t_04   t_41 t_40 t_45 t_44
>>> t_12 t_11 t_10 t_15   t_02 t_01 t_00 t_05   t_42 t_41 t_40 t_45
>>>
>>> t_20 t_25 t_24 t_23   t_10 t_15 t_14 t_13   t_00 t_05 t_04 t_03
>>> t_21 t_20 t_25 t_24   t_11 t_10 t_15 t_14   t_01 t_00 t_05 t_04
>>> t_22 t_21 t_20 t_25   t_12 t_11 t_10 t_15   t_02 t_01 t_00 t_05

This shows that one can define an L-level Toeplitz matrix by a tensor of order L together with means of deciding the sizes n_1,...,n_L of the individual levels.

__init__()

Initialize Toeplitz matrix instance.

One either has to specify (vecC, vecR) or tenT with optinal split argument.

Parameters
tenTnumpy.ndarray

This is the most general way to define a (multilevel) Toeplitz Matrix. The number of dimensions (length of .shape) determines the number of levels. If split is not defined then tenT needs to have odd size in each dimension, so that this results in a square matrix. The handling of the indexing in direction of columns follows the same reversed fashion as in the one-dimensional case with vecR, but here naturally for each level.

splitnumpy.ndarray, optional

This vector needs to have as many elements as the number of elements of tenT.shape. If it is specified it defines the number of elements which are used to determine the number of rows of each level. The rest of the elements are indexed in reverse order in the same fashion as without split.

**optionsoptional

Additional keyworded arguments. Supports all optional arguments supported by fastmat.Matrix and fastmat.Fourier.

All optional arguments will be passed on to all fastmat.Matrix instances that are generated during initialization.

Note:

For backward compatibility reasons it is still possible to substitute the tenT argument by two 1D numpy.ndarray arrays vecC and vecR that describe the column- and row-defining vectors in the single-level case respectively. The column-defining vector describes the forst column of the resulting matrix and the row-defining vector the first row except the (0,0) element (which is already specified by the column-defining vector). Note that this vector is indexed backwards in the sense that its first element is the last element in the defined Toeplitz matrix.

tenT

Return the defining Tensor of Toeplitz matrix.

vecC

Return the column-defining vector of Toeplitz matrix.

vecR

Return the row-defining vector of Toeplitz matrix.