Skip to main content

affine_transform_matrix

Function affine_transform_matrix 

Source
pub fn affine_transform_matrix(
    r: usize,
    params: &AffineParams,
    bc: &[BoundaryCondition],
) -> Result<CsMat<f64>>
Expand description

Compute the full affine transformation matrix directly (for verification).

This computes the transformation matrix by directly evaluating y = A*x + b for all possible input values. The result is a sparse boolean matrix.

§Arguments

  • r - Number of bits per variable
  • params - Affine transformation parameters
  • bc - Boundary conditions for each output variable

§Returns

Sparse matrix of size 2^(RM) × 2^(RN) where entry (y_flat, x_flat) = 1 if the transformation maps x to y.

§Note

This is only practical for small R due to exponential size. Use for testing/verification only.