zonopy.batchMatZonotope#

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

Bases: object

Batched 2D Matrix Zonotope class

Batched version of the matZonotope class for representing a zonotope in matrix form. This class represents a batch of matrix zonotopes similarly to how the batchZonotope class represents a batch of zonotopes over arbitrary batch dimensions.

This similarly results in a Z\mathbf{Z} tensor of shape B1×B2××(N+1)×dx×dyB_1 \times B_2 \times \ldots \times (N+1) \times dx \times dy.

Refer to the matZonotope class for more details.

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

Initialize the batch matrix zonotope

Parameters:
  • Z (torch.Tensor) – The Z\mathbf{Z} tensor of shape B1×B2××(N+1)×dx×dyB_1 \times B_2 \times \ldots \times (N+1) \times dx \times dy.

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

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

Raises:

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

Methods

__init__(Z[, dtype, device])

Initialize the batch matrix zonotope

cpu()

deleteZerosGenerators([sorted, sort])

delete zero vector generators self: <zonotope>

reduce(order[, option])

to([dtype, device])

Attributes

T

batch_shape

center

device

dtype

generators

n_cols

n_generators

n_rows

shape

property T#
property batch_shape#
property center#
cpu()[source]#
deleteZerosGenerators(sorted=False, sort=False)[source]#

delete zero vector generators self: <zonotope>

return <zonotope>

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]#