primapalooza

Crates.ioprimapalooza
lib.rsprimapalooza
version0.3.4
sourcesrc
created_at2015-06-26 23:40:30.911053
updated_at2016-01-12 04:08:39.063826
descriptionprime number calculations implemented in rust
homepagehttps://github.com/visualjeff/primapalooza
repositoryhttps://github.com/visualjeff/primapalooza.git
max_upload_size
id2473
size28,755
Jeff (visualjeff)

documentation

https://github.com/visualjeff/primapalooza

README

primapalooza

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

License

Licensed under either of

at your option.

Contribution

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.

Commit count: 38

cargo fmt