pub struct Rotation { /* private fields */ }Expand description
Deterministic randomized rotation. Build once per (dim, seed); apply many
times. apply is O(D log D) with no matrix stored.
Implementations§
Source§impl Rotation
impl Rotation
Sourcepub fn apply_in_place(&self, v: &mut [f32], scratch: &mut [f32])
pub fn apply_in_place(&self, v: &mut [f32], scratch: &mut [f32])
Rotate v in place. scratch must be dim long (used for the
permutation gather); contents are clobbered.
Sourcepub fn apply_inverse(&self, v: &[f32]) -> Vec<f32>
pub fn apply_inverse(&self, v: &[f32]) -> Vec<f32>
Inverse rotation (for tests/debugging; never needed on the search path).
Auto Trait Implementations§
impl Freeze for Rotation
impl RefUnwindSafe for Rotation
impl Send for Rotation
impl Sync for Rotation
impl Unpin for Rotation
impl UnsafeUnpin for Rotation
impl UnwindSafe for Rotation
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