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:where is the center matrix and are the generator matrices.
Here, we define as a tensor of shape where and are the number of rows and columns of all matrices, respectively. That is, .
- __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
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 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
- property T#
- property center#
- 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#
- property shape#