Function mvpoly::utils::is_prime

source ·
pub fn is_prime(n: usize) -> bool
Expand description

Naive implementation checking if n is prime You can also use the structure PrimeNumberGenerator to check if a number is prime using

use mvpoly::utils::PrimeNumberGenerator;
let n = 5;
let mut prime_gen = PrimeNumberGenerator::new();
prime_gen.is_prime(n);