zonopy.matPolyZonotope#

class zonopy.matPolyZonotope(Z, n_dep_gens=0, expMat=None, id=None, copy_Z=True, dtype=None, device=None)[source]#

Bases: object

2D Matrix Polynomial Zonotopes

The matrix polynomial zonotope is analogous to the polynomial zonotope like the matrix zonotope is to the zonotope.

It is defined as a set of the following form:

PZ:={C+i=1N(k=1pαkE(k,i))G(i)+j=1MβjGrest(j)  |  αk,βj[1,1]k=1,...,pj=1,...,M}\mathcal{PZ} := \left\{ C + \sum_{i=1}^{N} \left( \prod_{k=1}^{p}\alpha_{k}^{E_{(k,i)}}\right) \mathbf{G}_{(i)}+\sum_{j=1}^{M}\beta_{j}\mathbf{G}_{rest(j)} \; \middle\vert \; \begin{array}{l} \alpha_k, \beta_j \in [-1,1] \\ \forall k = 1,...,p \\ \forall j=1,...,M \end{array} \right\}

where

  • CRdx×dyC\in\mathbb{R}^{dx\times dy} is the center matrix,

  • G(i)Rdx×dy\mathbf{G}_{(i)}\in\mathbb{R}^{dx\times dy} is a single dependent generator, with G=[G(1),...,G(N)]\mathbf{G} = [\mathbf{G}_{(1)},...,\mathbf{G}_{(N)}],

  • Grest(j))Rdx×dy\mathbf{G}_{rest(j))}\in\mathbb{R}^{dx\times dy} is a single independent generator, with Grest=[Grest(1),...,Grest(M)]\mathbf{G}_{rest} = [\mathbf{G}_{rest(1)},...,\mathbf{G}_{rest(M)}],

  • ERp×NE\in\mathbb{R}^{p\times N} is the exponent matrix,

  • NN is the number of dependent generators,

  • MM is the number of independent generators, and

  • pp is the number of indeterminants.

__init__(Z, n_dep_gens=0, expMat=None, id=None, copy_Z=True, dtype=None, device=None)[source]#

Initialize the matrix polynomial zonotope

Parameters:
  • Z (torch.Tensor) – The center and generator tensor of the matrix polynomial zonotope Z=[C,G(1),,G(N),Grest(1),,Grest(M)]\mathbf{Z} = [C, \mathbf{G}_{(1)}, \ldots, \mathbf{G}_{(N)}, \mathbf{G}_{rest(1)}, \ldots, \mathbf{G}_{rest(M)}]

  • n_dep_gens (int, optional) – The number of dependent generators. Default: 0

  • expMat (torch.Tensor, optional) – The exponent matrix. Default: None

  • id (np.ndarray, optional) – The id array. Default: None

  • copy_Z (bool, optional) – If True, it will copy the input Z. Default: True

  • dtype (torch.dtype, optional) – The data type of the matrix polynomial zonotope. If None, it will be inferred. Default: None

  • device (torch.device, optional) – The device of the matrix polynomial zonotope. If None, it will be inferred. Default: None

Raises:
  • AssertionError – If the exponent matrix does not seem to be valid for the given dependent generators or ids.

  • AssertionError – If the number of dependent generators does not match the number of ids.

  • AssertionError – If the exponent matrix is not a non-negative integer matrix.

Methods

__init__(Z[, n_dep_gens, expMat, id, ...])

Initialize the matrix polynomial zonotope

compress(compression_level)

cpu()

eye(dim[, dtype, device])

ones(dim1[, dim2, dtype, device])

reduce(order[, option])

reduce_indep(order[, option])

to([dtype, itype, device])

to_matZonotope()

zeros(dim1[, dim2, dtype, device])

Attributes

C

G

Grest

T

device

dtype

input_pairs

itype

n_cols

n_generators

n_indep_gens

n_rows

shape

property C#
property G#
property Grest#
property T#
compress(compression_level)[source]#
cpu()[source]#
property device#
property dtype#
static eye(dim, dtype=None, device=None)[source]#
property input_pairs#
property itype#
property n_cols#
property n_generators#
property n_indep_gens#
property n_rows#
static ones(dim1, dim2=None, dtype=None, device=None)[source]#
reduce(order, option='girard')[source]#
reduce_indep(order, option='girard')[source]#
property shape#
to(dtype=None, itype=None, device=None)[source]#
to_matZonotope()[source]#
static zeros(dim1, dim2=None, dtype=None, device=None)[source]#