From 1c1fc752100bbd1d4d36ef727ee4b55efe7cecd5 Mon Sep 17 00:00:00 2001 From: Kim Walisch Date: Mon, 1 Jul 2024 15:26:49 +0200 Subject: [PATCH] Update doc --- include/generate.hpp | 18 +++++++++--------- src/generate.cpp | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/generate.hpp b/include/generate.hpp index 7ae65b47..b2b092cf 100644 --- a/include/generate.hpp +++ b/include/generate.hpp @@ -24,7 +24,7 @@ Vector generate_primes_i64(int64_t max); Vector generate_primes_u64(int64_t max); Vector generate_n_primes_i32(int64_t n); -/// Generate a vector with the primes <= max. +/// Returns a vector with the primes <= max. /// The primes vector uses 1-indexing i.e. primes[1] = 2. /// template @@ -34,7 +34,7 @@ generate_primes(int64_t max) return generate_primes_i32(max); } -/// Generate a vector with the primes <= max. +/// Returns a vector with the primes <= max. /// The primes vector uses 1-indexing i.e. primes[1] = 2. /// template @@ -44,7 +44,7 @@ generate_primes(int64_t max) return generate_primes_u32(max); } -/// Generate a vector with the primes <= max. +/// Returns a vector with the primes <= max. /// The primes vector uses 1-indexing i.e. primes[1] = 2. /// template @@ -54,7 +54,7 @@ generate_primes(int64_t max) return generate_primes_i64(max); } -/// Generate a vector with the primes <= max. +/// Returns a vector with the primes <= max. /// The primes vector uses 1-indexing i.e. primes[1] = 2. /// template @@ -64,7 +64,7 @@ generate_primes(int64_t max) return generate_primes_u64(max); } -/// Generate a vector with the first n primes. +/// Returns a vector with the first n primes. /// The primes vector uses 1-indexing i.e. primes[1] = 2. // template @@ -74,20 +74,20 @@ generate_n_primes(int64_t n) return generate_n_primes_i32(n); } -/// Generate a vector with Möbius function values +/// Returns a vector with Möbius function values Vector generate_moebius(int64_t max); -/// Generate a vector with the least prime +/// Returns a vector with the least prime /// factors of the integers <= max. /// Vector generate_lpf(int64_t max); -/// Generate a vector with the largest prime +/// Returns a vector with the largest prime /// factors of the integers <= max. /// Vector generate_mpf(int64_t max); -/// Generate a vector with the prime counts <= max +/// Returns a vector with the prime counts <= max /// using the sieve of Eratosthenes. /// Vector generate_pi(int64_t max); diff --git a/src/generate.cpp b/src/generate.cpp index b1188117..bceee221 100644 --- a/src/generate.cpp +++ b/src/generate.cpp @@ -17,7 +17,7 @@ namespace primecount { -/// Generate a vector with the primes <= max. +/// Returns a vector with the primes <= max. /// The primes vector uses 1-indexing i.e. primes[1] = 2. /// Vector generate_primes_i32(int64_t max) @@ -29,7 +29,7 @@ Vector generate_primes_i32(int64_t max) return primes; } -/// Generate a vector with the primes <= max. +/// Returns a vector with the primes <= max. /// The primes vector uses 1-indexing i.e. primes[1] = 2. /// Vector generate_primes_u32(int64_t max) @@ -41,7 +41,7 @@ Vector generate_primes_u32(int64_t max) return primes; } -/// Generate a vector with the primes <= max. +/// Returns a vector with the primes <= max. /// The primes vector uses 1-indexing i.e. primes[1] = 2. /// Vector generate_primes_i64(int64_t max) @@ -53,7 +53,7 @@ Vector generate_primes_i64(int64_t max) return primes; } -/// Generate a vector with the primes <= max. +/// Returns a vector with the primes <= max. /// The primes vector uses 1-indexing i.e. primes[1] = 2. /// Vector generate_primes_u64(int64_t max) @@ -65,7 +65,7 @@ Vector generate_primes_u64(int64_t max) return primes; } -/// Generate a vector with the first n primes. +/// Returns a vector with the first n primes. /// The primes vector uses 1-indexing i.e. primes[1] = 2. // Vector generate_n_primes_i32(int64_t n) @@ -77,7 +77,7 @@ Vector generate_n_primes_i32(int64_t n) return primes; } -/// Generate a vector with the prime counts <= max +/// Returns a vector with the prime counts <= max /// using the sieve of Eratosthenes /// Vector generate_pi(int64_t max) @@ -105,7 +105,7 @@ Vector generate_pi(int64_t max) return pi; } -/// Generate a vector with Möbius function values. +/// Returns a vector with Möbius function values. /// This implementation is based on code by Rick Sladkey: /// https://mathoverflow.net/q/99545 /// @@ -142,7 +142,7 @@ Vector generate_moebius(int64_t max) return mu; } -/// Generate a vector with the least prime factors +/// Returns a vector with the least prime factors /// of the integers <= max. /// @Examples: lfp(2) = 2, lpf(15) = 3 /// @@ -177,7 +177,7 @@ Vector generate_lpf(int64_t max) return lpf; } -/// Generate a vector with the largest prime factors +/// Returns a vector with the largest prime factors /// of the integers <= max. /// @Examples: mfp(2) = 2, mpf(15) = 5 ///