Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Jul 1, 2024
1 parent 0b37894 commit 1c1fc75
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions include/generate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Vector<int64_t> generate_primes_i64(int64_t max);
Vector<uint64_t> generate_primes_u64(int64_t max);
Vector<int32_t> 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 <typename T>
Expand All @@ -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 <typename T>
Expand All @@ -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 <typename T>
Expand All @@ -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 <typename T>
Expand All @@ -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 <typename T>
Expand All @@ -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<int32_t> 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<int32_t> 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<int32_t> 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<int32_t> generate_pi(int64_t max);
Expand Down
18 changes: 9 additions & 9 deletions src/generate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int32_t> generate_primes_i32(int64_t max)
Expand All @@ -29,7 +29,7 @@ Vector<int32_t> 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<uint32_t> generate_primes_u32(int64_t max)
Expand All @@ -41,7 +41,7 @@ Vector<uint32_t> 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<int64_t> generate_primes_i64(int64_t max)
Expand All @@ -53,7 +53,7 @@ Vector<int64_t> 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<uint64_t> generate_primes_u64(int64_t max)
Expand All @@ -65,7 +65,7 @@ Vector<uint64_t> 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<int32_t> generate_n_primes_i32(int64_t n)
Expand All @@ -77,7 +77,7 @@ Vector<int32_t> 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<int32_t> generate_pi(int64_t max)
Expand Down Expand Up @@ -105,7 +105,7 @@ Vector<int32_t> 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
///
Expand Down Expand Up @@ -142,7 +142,7 @@ Vector<int32_t> 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
///
Expand Down Expand Up @@ -177,7 +177,7 @@ Vector<int32_t> 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
///
Expand Down

0 comments on commit 1c1fc75

Please sign in to comment.