pub struct Quantized<Q: Quantize>(/* private fields */);Expand description
Contains a quantized value.
use numquant::{Quantized, IntRange};
let q = Quantized::<IntRange<u8, 0xff, 0, 1000>>::from_f64(500.0);
let v = q.to_f64();
approx::assert_abs_diff_eq!(v, 500.0, epsilon = 2.0);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<Q> Freeze for Quantized<Q>
impl<Q> RefUnwindSafe for Quantized<Q>
impl<Q> Send for Quantized<Q>
impl<Q> Sync for Quantized<Q>
impl<Q> Unpin for Quantized<Q>
impl<Q> UnwindSafe for Quantized<Q>
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