1 // Copyright(c)'1994-2009 by The Givaro group
2 // This file is part of Givaro.
3 // Givaro is governed by the CeCILL-B license under French law
4 // and abiding by the rules of distribution of free software.
5 // see the COPYRIGHT file for more details.
6 
7 /*! @file examples/Integer/nextprime.C
8  * @ingroup examples
9  * @ingroup integers
10  * @example examples/Integer/nextprime.C
11  * @brief NO DOC
12  */
13 #include <iostream>
14 using namespace std;
15 #include <stdlib.h>
16 #include <givaro/givintprime.h>
17 #include <givaro/givtimer.h>
18 #include <givaro/givinit.h>         // Givaro initialization
19 
20 
21 using namespace Givaro;
22 
23 
24 
25 
main(int argc,char ** argv)26 int main(int argc, char** argv)
27 {
28     //  Givaro::Init(&argc, &argv);
29 
30 
31     IntPrimeDom IP;
32     IntPrimeDom::Element m, ff;
33     if (argc > 1) m = Integer(argv[1]);
34     else std::cin >> m;
35 
36     Timer tim; tim.clear(); tim.start();
37     IP.nextprimein(m,1);
38     tim.stop();
39     cout << m << endl;
40     cerr << tim << endl;
41 
42     //  Givaro::End();
43 
44     return 0;
45 }
46 
47 /* -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
48 // vim:sts=4:sw=4:ts=4:et:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s
49