zonopy.batchMatPolyZonotope#

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

Bases: object

Batched 2D Matrix Polynomial Zonotopes

Batched form of the matPolyZonotope class. This class is designed to represent a batch of 2D matrix polynomial zonotopes over the same domain with arbitrary batch dimensions, extending the concept of polynomial zonotopes to matrix forms and allowing for batch processing. It adheres to a formulation similar to the polyZonotope and batchPolyZonotope classes, enabling efficient representation and manipulation of sets of matrix polynomial zonotopes.

This results in a ZRB1×B2××Bb×(N+M+1)×dx×dy\mathbf{Z} \in \mathbb{R}^{B_1 \times B_2 \times \cdots \times B_b \times (N+M+1) \times dx \times dy} tensor, where dxdx and dydy are the dimensions of the matrices.

Refer to the matPolyZonotope class for more detailed information on matrix polynomial zonotopes.

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

Constructor for the batchMatPolyZonotope class

Initializes a batch of 2D matrix polynomial zonotopes with specified characteristics.

Parameters:
  • Z (torch.Tensor) – The center and generator tensor for the batch of matrix polynomial zonotopes. The shape of Z should be (B1,B2,,Bb,N+M+1,dx,dy)(B_1, B_2, \cdots, B_b, N+M+1, dx, dy), where B1,B2,,BbB_1, B_2, \cdots, B_b are the batch dimensions, NN is the number of dependent generators, MM is the number of independent generators, and dx,dydx, dy are the dimensions of the matrices.

  • n_dep_gens (int, optional) – The number of dependent generators in the matrix polynomial zonotope. Default: 0.

  • expMat (torch.Tensor, optional) – The exponent matrix for the dependent generators. If None, it will be assumed to be the identity matrix. Default: None.

  • id (torch.Tensor, optional) – The integer identifiers for the dependent generators. If None, it will be the range of the number of dependent generators. Default: None.

  • copy_Z (bool, optional) – If True, a copy of the input Z tensor will be made. Default: True.

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

  • device (torch.device, optional) – The device on which the matrix polynomial zonotope is to be stored. If None, it will be inferred from Z. Default: None.

Raises:
  • AssertionError – If the dimension of the Z input is not 5 or more, indicating incorrect batch dimensions or matrix dimensions.

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

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

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

Methods

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

Constructor for the batchMatPolyZonotope class

combine_bmpz(bmpzlist, idxs)

compress(compression_level)

cpu()

eye(batch_size, dim[, dtype, device])

from_mpzlist(mpzlist)

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

reduce_indep(order[, option])

to([dtype, itype, device])

to_batchMatZonotope()

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

Attributes

C

G

Grest

T

batch_shape

device

dtype

input_pairs

itype

n_cols

n_generators

n_indep_gens

n_rows

shape

property C#
property G#
property Grest#
property T#
property batch_shape#
static combine_bmpz(bmpzlist, idxs)[source]#
compress(compression_level)[source]#
cpu()[source]#
property device#
property dtype#
static eye(batch_size, dim, dtype=None, device=None)[source]#
static from_mpzlist(mpzlist)[source]#
property input_pairs#
property itype#
property n_cols#
property n_generators#
property n_indep_gens#
property n_rows#
static ones(batch_size, dim1, dim2=None, dtype=None, device=None)[source]#
reduce_indep(order, option='girard')[source]#
property shape#
to(dtype=None, itype=None, device=None)[source]#
to_batchMatZonotope()[source]#
static zeros(batch_size, dim1, dim2=None, dtype=None, device=None)[source]#