waLBerla 7.2
Loading...
Searching...
No Matches
Primes.h File Reference

Detailed Description

Declares functions dealing with prime numbers.

Author
Christian Godenschwager chris.nosp@m.tian.nosp@m..gode.nosp@m.nsch.nosp@m.wager.nosp@m.@fau.nosp@m..de
#include "core/DataTypes.h"
#include <set>
#include <vector>

Namespaces

namespace  walberla
 Storage for detected contacts which can be used to perform actions for all contacts, e.g.
 
namespace  walberla::math
 

Functions

bool walberla::math::isPrime (const uint_t n)
 Query if n is prime.
 
std::vector< uint_twalberla::math::getPrimes (const uint_t n)
 Determine prime numbers up to an upper bound.
 
std::vector< uint_twalberla::math::getPrimeFactors (const uint_t n)
 Gets all prime factors of a number.
 
std::set< uint_twalberla::math::getDevisors (const uint_t n)
 Gets all devisors of a number n.