Skip to main content

try_all_permutations

Function try_all_permutations 

Source
pub fn try_all_permutations(
    grid_a: &[(Float, Float, Float)],
    nu_a: usize,
    nv_a: usize,
    grid_b: &[(Float, Float, Float)],
    nu_b: usize,
    nv_b: usize,
    tol: Float,
) -> Option<u8>
Expand description

Try all 8 permutation matrices on grid_b to find one that matches grid_a.

For each permutation index 0..8:

  1. Apply the permutation to grid_b via apply_permutation.
  2. Check output shape matches grid_a’s shape.
  3. Compare point-by-point via verify_match.

Returns Some(perm_idx) on the first match, or None if no permutation works.