Crates.io | primapalooza |
lib.rs | primapalooza |
version | 0.3.4 |
source | src |
created_at | 2015-06-26 23:40:30.911053 |
updated_at | 2016-01-12 04:08:39.063826 |
description | prime number calculations implemented in rust |
homepage | https://github.com/visualjeff/primapalooza |
repository | https://github.com/visualjeff/primapalooza.git |
max_upload_size | |
id | 2473 |
size | 28,755 |
Name says it all. Handy prime number functions implemented in Rust.
Add primapalooza dependency to your project Cargo.toml file:
[dependencies]
primapalooza = "0.3.4"
Add primapalooza to your project's source code:
extern crate primapalooza;
use primapalooza::is_prime;
use primapalooza:generate_primes;
Methods signatures:
fn is_prime(usize) -> bool
fn is_prime_why_not(usize) -> bool
fn perfect_number(usize) -> bool
fn get_next_prime_number(usize) -> usize
fn get_twin_primes(usize) -> (usize, usize)
fn prime_factorization(usize) -> Vec<usize>
fn greatest_common_factor(usize, usize) -> usize
fn least_common_multiple(usize, usize) -> usize
fn number_of_primes(usize, usize) -> usize
fn number_of_factors(usize) -> usize
fn mersenne_prime(usize) -> usize
fn get_nth_prime(usize) -> usize
fn generate_primes(usize) -> Vec<usize>
fn is_lucky_number(usize) -> bool
fn is_triangular_number(usize) -> bool
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.