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:
where
is the center matrix,
is a single dependent generator, with ,
is a single independent generator, with ,
is the exponent matrix,
is the number of dependent generators,
is the number of independent generators, and
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
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])zeros
(dim1[, dim2, dtype, device])Attributes
- property C#
- property G#
- property Grest#
- property T#
- property device#
- property dtype#
- property input_pairs#
- property itype#
- property n_cols#
- property n_generators#
- property n_indep_gens#
- property n_rows#
- property shape#