NO DOC.
#include <iostream>
#define GIVARO_LENSTRA
#include <givaro/givintnumtheo.h>
#include <givaro/givtimer.h>
#ifndef TIMING
#define TIMING 1
#endif
int main(
int argc,
char** argv)
{
#ifndef __GIVARO_GMP_NO_CXX
#endif
IntNumTheoDom<>::Element a,pr;
if (argc > 1) a = IntNumTheoDom<>::Element(argv[1]); else std::cin >> a;
uint64_t runs(0);
std::vector<Integer> Lf;
IP.write(std::cout <<
"Totient : ", Lf,phin) << std::endl;
for(uint64_t i = 0; i <
TIMING; ++i)
IP.prim_root_of_prime(pr, a);
IP.write( std::cout <<
"Deterministic : ", pr ) << std::endl;
std::cerr << tim << std::endl;
}
for(uint64_t i = 0; i <
TIMING; ++i)
IP.prim_root(pr, runs, a);
IP.write( std::cout <<
"Random : ", pr ) << std::endl;
std::cerr << tim << " (" << runs << " runs)" << std::endl;
for(uint64_t i = 0; i <
TIMING; ++i)
IP.lowest_prim_root(pr, a);
IP.write( std::cout <<
"Lowest : ", pr ) << std::endl;
std::cerr << tim << std::endl;
return 0;
}
IntFactorDom IP
Definition ProbLucas.C:43
Num theory Domain.
Definition givintnumtheo.h:33
This is the Integer class.
Definition gmp++_int.h:160
Timer.
Definition givtimer.h:129
void start()
Start timer.
Definition givtimer.C:164
void stop()
Stop timer.
Definition givtimer.C:172
void clear()
Clear timer.
Definition givtimer.C:155
int main()
Definition f4n3.cpp:22
Namespace in which the whole Givaro library resides.
Definition all_field.C:23
#define TIMING
Definition primitiveroot.C:20