pygrenade_vx.common.MultiIndexSequence

class pygrenade_vx.common.MultiIndexSequence

Bases: pybind11_builtins.pybind11_object

__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(*args, **kwargs)

Initialize self.

cartesian_product(self, other)

Construct sequence which is the cartesian product of this sequence and the other sequence.

dimensionality(self)

Get dimensionality of multi-indices in sequence.

distinct_projection(self, dimensions)

Get distinct projection of sequence onto given dimensions.

get_dimension_units(self)

Get dimension units.

get_elements(self)

Get elements in sequence.

includes(self, other)

Get whether all elements of other sequence are present in this sequence.

is_disjunct(self, other)

Check whether no element of sequence is present in other sequence.

is_injective(self)

Get whether sequence of elements is injective.

projection(self, dimensions)

Get projection of sequence onto given dimensions.

related_sequence_subset_restriction(self, …)

Get restriction of sequence defined by subset restriction of related sequence.

size(self)

Get number of elements in sequence.

slice(self, indices)

Slice sequence linearly at given indices.

subset_restriction(self, other)

Get restriction of sequence onto subset of elements present in other sequence.

class DimensionUnit

Bases: pybind11_builtins.pybind11_object

cartesian_product(self: pygrenade_common.MultiIndexSequence, other: pygrenade_common.MultiIndexSequence)pygrenade_common.MultiIndexSequence

Construct sequence which is the cartesian product of this sequence and the other sequence.

dimensionality(self: pygrenade_common.MultiIndexSequence)int

Get dimensionality of multi-indices in sequence.

distinct_projection(self: pygrenade_common.MultiIndexSequence, dimensions: set[int])pygrenade_common.MultiIndexSequence

Get distinct projection of sequence onto given dimensions. The resulting sequence consists of distinct elements.

get_dimension_units(self: pygrenade_common.MultiIndexSequence)list[dapr::PropertyHolder<grenade::common::MultiIndexSequence::DimensionUnit, std::unique_ptr>]

Get dimension units.

get_elements(self: pygrenade_common.MultiIndexSequence)list[pygrenade_common.MultiIndex]

Get elements in sequence.

includes(self: pygrenade_common.MultiIndexSequence, other: pygrenade_common.MultiIndexSequence)bool

Get whether all elements of other sequence are present in this sequence. The dimension units are required to match in addition to set inclusion.

is_disjunct(self: pygrenade_common.MultiIndexSequence, other: pygrenade_common.MultiIndexSequence)bool

Check whether no element of sequence is present in other sequence.

is_injective(self: pygrenade_common.MultiIndexSequence)bool

Get whether sequence of elements is injective. This is the case if all elements are distinct.

projection(self: pygrenade_common.MultiIndexSequence, dimensions: set[int])pygrenade_common.MultiIndexSequence

Get projection of sequence onto given dimensions.

related_sequence_subset_restriction(self: pygrenade_common.MultiIndexSequence, related: pygrenade_common.MultiIndexSequence, subset: pygrenade_common.MultiIndexSequence)pygrenade_common.MultiIndexSequence

Get restriction of sequence defined by subset restriction of related sequence. Elements are part of the restricted sequence, if the element at the same index in the related sequence is part of the subset.

size(self: pygrenade_common.MultiIndexSequence)int

Get number of elements in sequence.

slice(self: pygrenade_common.MultiIndexSequence, indices: set[int])list[pygrenade_common.MultiIndexSequence]

Slice sequence linearly at given indices. The splits then contain sequences of the elements at the positions in the open intervals [0, indices[0]), [indices[i], indices[i+1]), …, [indices[N-1], size).

subset_restriction(self: pygrenade_common.MultiIndexSequence, other: pygrenade_common.MultiIndexSequence)pygrenade_common.MultiIndexSequence

Get restriction of sequence onto subset of elements present in other sequence.