resistance_to_transformation_bytes

Function resistance_to_transformation_bytes 

Source
pub fn resistance_to_transformation_bytes(
    x: &[u8],
    tx: &[u8],
    max_order: i64,
) -> f64
Expand description

Primitive 7: Resistance under Allowed Transformations.

Measures how much information is preserved after a transformation T is applied to X.

Resistance(X, T) = I(X; T(X)) / H(X)

Range [0,1] (with guard for H(X)=0).

  • 1 means perfectly resistant (identity transformation).
  • 0 means the transformation destroyed all information (e.g. mapping everything to a constant).

Assumes X and T(X) are aligned.