pub struct Spf { /* private fields */ }Implementations§
Source§impl Spf
A struct representing the smallest prime factor (SPF) computation.
impl Spf
A struct representing the smallest prime factor (SPF) computation.
Sourcepub fn factorize(&self, x: u64) -> Vec<u64>
pub fn factorize(&self, x: u64) -> Vec<u64>
Factorizes a given number into its prime factors.
§Arguments
x- The number to be factorized.
§Returns
A vector containing the prime factors of x.
§Panics
Panics if x is greater than the max_limit specified during the creation of the Spf instance.
§Complexity
The factorization process takes O(log n) time after the SPF computation.
Auto Trait Implementations§
impl Freeze for Spf
impl RefUnwindSafe for Spf
impl Send for Spf
impl Sync for Spf
impl Unpin for Spf
impl UnwindSafe for Spf
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