CADETProcess.dataStructure.parameter.Sized

Contents

CADETProcess.dataStructure.parameter.Sized#

class CADETProcess.dataStructure.parameter.Sized(*args, size, **kwargs)[source]#

Descriptor for parameters with size that potentially depends on instance attributes.

Attributes:
sizetuple

Expected size or dimensions of the parameter. Individual elements can be either integers or strings indicating other instance parameters that influence the size.

Methods

is_independent

Determine whether the size is independent of other parameters.

get_size(value) -> int

Calculates the size of the given value. Override for custom behavior.

get_expected_size(instance) -> int

Computes the expected size based on the instance’s other attributes.

check_size(instance, value)

Validates that the provided value’s size matches the expected size.