pub struct SwsVector { /* private fields */ }Implementations§
Source§impl SwsVector
impl SwsVector
pub fn as_ptr(&self) -> *const SwsVector
pub fn as_mut_ptr(&mut self) -> *mut SwsVector
Sourcepub unsafe fn set_ptr(&mut self, ptr: NonNull<SwsVector>)
pub unsafe fn set_ptr(&mut self, ptr: NonNull<SwsVector>)
§Safety
This function should only be called when the pointer is valid and the data it’s pointing to can be dropped.
Sourcepub unsafe fn from_raw(raw: NonNull<SwsVector>) -> Self
pub unsafe fn from_raw(raw: NonNull<SwsVector>) -> Self
§Safety
This function should only be called when the pointer is valid and the data it’s pointing to can be dropped.
pub fn into_raw(self) -> NonNull<SwsVector>
Source§impl SwsVector
impl SwsVector
Sourcepub fn new(length: i32) -> Option<Self>
pub fn new(length: i32) -> Option<Self>
Allocate and return an uninitialized vector with length coefficients.
If length is bigger than INT_MAX / sizeof(double) or smaller than 0, None is returned.
Sourcepub fn get_gaussian_vec(variance: f64, quality: f64) -> Option<Self>
pub fn get_gaussian_vec(variance: f64, quality: f64) -> Option<Self>
Return a normalized Gaussian curve used to filter stuff. quality = 3 is high quality, lower is lower quality.
Sourcepub fn normalize(&mut self, height: f64)
pub fn normalize(&mut self, height: f64)
Scale all the coefficients of a so that their sum equals height.
pub fn coeff(&self) -> &[f64]
pub fn coeff_mut(&mut self) -> &mut [f64]
Trait Implementations§
Auto Trait Implementations§
impl !Sync for SwsVector
impl Freeze for SwsVector
impl RefUnwindSafe for SwsVector
impl Unpin for SwsVector
impl UnsafeUnpin for SwsVector
impl UnwindSafe for SwsVector
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