zonopy.matZonotope#

class zonopy.matZonotope(Z, dtype=None, device=None)[source]#

Bases: object

2D Matrix Zonotope class for representing a zonotope in matrix form.

The matrix zonotope is defined as a set of linear combinations of a center vector and generator matrix. Similar to the zonotope class, the matrix zonotope is defined as a set of linear combinations of a center vector and generator matrix. In this case, it is a set of the form:

Z:={C+i=1NaiGi  |  ai[0,1]}\mathcal{Z} := \left\{ C + \sum_{i=1}^{N} a_i G_i \; \middle\vert \; a_i \in [0,1] \right\}

where CC is the center matrix and GiG_i are the generator matrices.

Here, we define Z\mathbf{Z} as a tensor of shape (N+1)×dx×dy(N+1) \times dx \times dy where dxdx and dydy are the number of rows and columns of all matrices, respectively. That is, Z=[C,G1,G2,,GN]\mathbf{Z} = [C, G_1, G_2, \ldots, G_N].

__init__(Z, dtype=None, device=None)[source]#

Initialize the matrix zonotope with a center and generator matrix.

Parameters:
  • Z (torch.Tensor) – The center and generator matrix of the matrix zonotope Z=[C,G1,G2,,GN]\mathbf{Z} = [C, G_1, G_2, \ldots, G_N]

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

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

Raises:

AssertionError – If the dimension of the input Z\mathbf{Z} is not 3.

Methods

__init__(Z[, dtype, device])

Initialize the matrix zonotope with a center and generator matrix.

cpu()

deleteZerosGenerators([eps])

delete zero vector generators self: <matZonotope>

reduce(order[, option])

to([dtype, device])

Attributes

T

center

device

dtype

generators

n_cols

n_generators

n_rows

shape

property T#
property center#
cpu()[source]#
deleteZerosGenerators(eps=0)[source]#

delete zero vector generators self: <matZonotope>

return <matZonotope>

property device#
property dtype#
property generators#
property n_cols#
property n_generators#
property n_rows#
reduce(order, option='girard')[source]#
property shape#
to(dtype=None, device=None)[source]#