Orthogonal Array Library  1.0.0
Libray for generating orthogonal arrays based on Art Owen's oa library
All Classes Namespaces Files Functions Variables Typedefs Macros Pages
primes.h
Go to the documentation of this file.
1 
31 #ifndef PRIMES_H
32 #define PRIMES_H
33 
34 #include "OACommonDefines.h"
35 
39 #define ISPRIMETRUE 1
40 
43 #define ISPRIMEFALSE 0
44 
45 namespace oacpp {
49  namespace primes
50  {
56  int isprime(unsigned int n);
57 
64  int isprime_old(int p);
65 
73  void primepow(int q, int* p, int* n, int* isit);
74 
80  int isprimepow(int q );
81 
88  int ipow( int a, int b );
89  } // end namespace
90 }// end namespace
91 
92 #endif
oacpp::primes::isprime
int isprime(unsigned int n)
returns 1 for prime argument
Definition: primes.cpp:59
oacpp
Orthogonal Array Namespace.
Definition: ak.h:39
oacpp::primes::isprimepow
int isprimepow(int q)
returns 1 for prime power argument
Definition: primes.cpp:143
oacpp::primes::isprime_old
int isprime_old(int p)
Is the number prime.
Definition: primes.cpp:37
OACommonDefines.h
oacpp::primes::ipow
int ipow(int a, int b)
pow() with integer arguments and value
Definition: primes.cpp:150
oacpp::primes::primepow
void primepow(int q, int *p, int *n, int *isit)
find q=p^n if q is a prime power with n>0
Definition: primes.cpp:92