pub struct PrimeFactors {
other_factors: Vec<PrimeFactor>,
n: usize,
power_two: u32,
power_three: u32,
total_factor_count: u32,
distinct_factor_count: u32,
}Fields§
§other_factors: Vec<PrimeFactor>§n: usize§power_two: u32§power_three: u32§total_factor_count: u32§distinct_factor_count: u32Implementations§
Source§impl PrimeFactors
impl PrimeFactors
pub fn compute(n: usize) -> Self
pub fn is_prime(&self) -> bool
pub fn get_product(&self) -> usize
pub fn get_total_factor_count(&self) -> u32
pub fn get_distinct_factor_count(&self) -> u32
pub fn get_power_of_two(&self) -> u32
pub fn get_power_of_three(&self) -> u32
pub fn get_other_factors(&self) -> &[PrimeFactor]
pub fn is_power_of_three(&self) -> bool
pub fn remove_factors(self, factor: PrimeFactor) -> Option<Self>
pub fn has_factors_leq(&self, factor: usize) -> bool
pub fn has_factors_gt(&self, factor: usize) -> bool
pub fn product_above(&self, min_factor: usize) -> usize
pub fn partition_factors(self) -> (Self, Self)
Trait Implementations§
Source§impl Clone for PrimeFactors
impl Clone for PrimeFactors
Source§fn clone(&self) -> PrimeFactors
fn clone(&self) -> PrimeFactors
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PrimeFactors
impl RefUnwindSafe for PrimeFactors
impl Send for PrimeFactors
impl Sync for PrimeFactors
impl Unpin for PrimeFactors
impl UnsafeUnpin for PrimeFactors
impl UnwindSafe for PrimeFactors
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