pub struct AffineP {
pub p: u64,
pub n: usize,
pub matrix: Vec<Vec<u64>>,
pub translation: Vec<u64>,
}Expand description
An affine map of GF(p)ⁿ: x ↦ A x + b. matrix[i][j] is A’s entry, translation is b; both
reduced mod p. A bijection iff A ∈ GL(n,p).
Fields§
§p: u64§n: usize§matrix: Vec<Vec<u64>>§translation: Vec<u64>Implementations§
Source§impl AffineP
impl AffineP
Sourcepub fn compose(&self, other: &AffineP) -> AffineP
pub fn compose(&self, other: &AffineP) -> AffineP
Composition self ∘ other over GF(p): linear parts multiply, b ↦ A_self·b_other + b_self.
Sourcepub fn is_bijection(&self) -> bool
pub fn is_bijection(&self) -> bool
Whether the linear part is invertible over GF(p) (so the map is a bijection of the cube).
Sourcepub fn is_monomial(&self) -> bool
pub fn is_monomial(&self) -> bool
Whether the linear part is monomial — one nonzero entry per row and per column (a scaled
permutation). These are exactly the Bₙ-analog over GF(p); everything else is a genuine shear.
Trait Implementations§
impl Eq for AffineP
impl StructuralPartialEq for AffineP
Auto Trait Implementations§
impl Freeze for AffineP
impl RefUnwindSafe for AffineP
impl Send for AffineP
impl Sync for AffineP
impl Unpin for AffineP
impl UnsafeUnpin for AffineP
impl UnwindSafe for AffineP
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more