pub struct AffineTransform {
pub a: [f64; 25],
pub b: [f64; 5],
pub prob: f64,
}Expand description
An affine transformation for IFS: w(x) = A·x + b.
Fields§
§a: [f64; 25]5x5 contraction matrix (flattened, row-major)
b: [f64; 5]Translation vector (5D)
prob: f64Probability weight
Implementations§
Source§impl AffineTransform
impl AffineTransform
Sourcepub fn apply_inverse_1d(&self, y: f64, dim: usize) -> f64
pub fn apply_inverse_1d(&self, y: f64, dim: usize) -> f64
Apply the inverse of the 1D diagonal approximation: T^{-1}(y) = (y - b) / a_diag.
For the diagonal element a[i*5+i] (the contraction factor for dimension i). If a_diag ≈ 0, returns 0.0 (degenerate case).
Trait Implementations§
Source§impl Clone for AffineTransform
impl Clone for AffineTransform
Source§impl Debug for AffineTransform
impl Debug for AffineTransform
Source§impl<'de> Deserialize<'de> for AffineTransform
impl<'de> Deserialize<'de> for AffineTransform
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AffineTransform
impl RefUnwindSafe for AffineTransform
impl Send for AffineTransform
impl Sync for AffineTransform
impl Unpin for AffineTransform
impl UnsafeUnpin for AffineTransform
impl UnwindSafe for AffineTransform
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