CADETProcess.dataStructure.parameter.DependentlyModulated#
- class CADETProcess.dataStructure.parameter.DependentlyModulated(*args: Any, size: int | tuple, **kwargs: Any)[source]#
Bases:
SizedMixin for checking parameter shapes based on other instance attributes.
This mixin ensures that the size of a parameter is modulo an expected size. If this condition is not met, a ValueError is raised.
- check_mod_value(instance: Any, value: Any) None[source]#
Check if the size of the parameter modulo its expected size is zero.
By default, this method checks the modulo condition, but can be overridden by subclasses to incorporate custom behaviors.
- Parameters:
- instanceAny
The instance associated with the parameter.
- valueAny
The value whose size needs to be validated.
- Raises:
- ValueError
If the modulo condition of the size does not meet the expected criteria.
- check_size(instance: Any, value: Any) None#
Check if the size of the parameter modulo its expected size is zero.
By default, this method checks the modulo condition, but can be overridden by subclasses to incorporate custom behaviors.
- Parameters:
- instanceAny
The instance associated with the parameter.
- valueAny
The value whose size needs to be validated.
- Raises:
- ValueError
If the modulo condition of the size does not meet the expected criteria.