assume_safe
compression_safeguards.safeguards.combinators.assume_safe
Always safe (logical truth) combinator safeguard.
Classes:
-
AssumeAlwaysSafeguard–The
AssumeAlwaysSafeguardassumes that all elements always meet their guarantees
AssumeAlwaysSafeguard
AssumeAlwaysSafeguard()
Bases: PointwiseSafeguard
The AssumeAlwaysSafeguard assumes that all elements always meet their guarantees
and are thus always safe.
This safeguards can be used with the
SelectSafeguard to express regions that are
not of interest, i.e. where no additional safety requirements are imposed.
Methods:
-
check_pointwise–All elements are safe and thus always succeed the check.
-
compute_safe_intervals–Since all values are always safe, the safe intervals for each element
-
compute_footprint–Since all values are always safe, the footprint of the
footarray is -
compute_inverse_footprint–Since all values are always safe, the inverse footprint of the
foot -
get_config–Returns the configuration of the safeguard.
late_bound
property
The set of late-bound parameters that this safeguard has.
Late-bound parameters are only bound when checking and applying the safeguard, in contrast to the normal early-bound parameters that are configured during safeguard initialisation.
Late-bound parameters can be used for parameters that depend on the specific data that is to be safeguarded.
check_pointwise
check_pointwise(
data: ndarray[S, dtype[T]],
approximation: ndarray[S, dtype[T]],
*,
late_bound: Bindings,
where: Literal[True] | ndarray[S, dtype[bool]] = True,
) -> ndarray[S, dtype[bool]]
All elements are safe and thus always succeed the check.
| Parameters: |
|
|---|
| Returns: |
|---|
compute_safe_intervals
compute_safe_intervals(
data: ndarray[S, dtype[T]],
*,
late_bound: Bindings,
where: Literal[True] | ndarray[S, dtype[bool]] = True,
) -> IntervalUnion[T, int, int]
Since all values are always safe, the safe intervals for each element
in the data array are full (contain all possible values).
| Parameters: |
|
|---|
| Returns: |
|
|---|
compute_footprint
compute_footprint(
foot: ndarray[S, dtype[bool]],
*,
late_bound: Bindings,
where: Literal[True] | ndarray[S, dtype[bool]] = True,
) -> ndarray[S, dtype[bool]]
Since all values are always safe, the footprint of the foot array is
False everywhere.
| Parameters: |
|
|---|
| Returns: |
|---|
compute_inverse_footprint
compute_inverse_footprint(
foot: ndarray[S, dtype[bool]],
*,
late_bound: Bindings,
where: Literal[True] | ndarray[S, dtype[bool]] = True,
) -> ndarray[S, dtype[bool]]
Since all values are always safe, the inverse footprint of the foot
array is False everywhere.
| Parameters: |
|
|---|
| Returns: |
|---|