pub fn check_prime(&self, x: usize) -> bool {
        if x >= self.len() {
            panic!(
                "number out of bounds: the {} is 1 but the number is {}",
                self.len(),
                x
            );
        }
        self.is_prime[x]
    }
/// Returns `true` if the value is a prime.
///
/// # Examples
///
/// ```
/// # use lib_rust::math::prime::Prime;
/// let map = Prime::new(15);
///
/// let primes = vec![2, 3, 5, 7, 11, 13];
/// assert!(primes.iter().all(|&i| map.check_prime(i)));
///
/// let not_primes = vec![0, 1, 4, 6, 8, 9, 12, 14, 15];
/// assert!(not_primes.iter().all(|&i| !map.check_prime(i)));
/// ```
///
/// # Panics
///
/// Panics if the value is larger than `self.len()`.
Returns `true` if the value is a prime.
Returns ` true ` if the value is a prime .
pub fn check_prime(&self, x: usize) -> bool {
        if x >= self.len() {
            panic!(
                "number out of bounds: the {} is 1 but the number is {}",
                self.len(),
                x
            );
        }
        self.is_prime[x]
    }
pub fn check_prime ( & self , x : usize ) -> bool { if x >= self . len ( ) { panic ! ( " " self len ( ) x ) ; } self . is_prime [ x ] }
Returns `true` if the value is a prime.
Returns ` true ` if the value is a prime .
&self
x
usize
&self
x
usize
examples
None
use lib_rust::math::prime::prime;
None
panics
Panics if the value is larger than `self.len()`.
Panics if the value is larger than ` self . len () ` .