File: order.C

package info (click to toggle)
givaro 3.2.10-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,388 kB
  • ctags: 2,088
  • sloc: cpp: 11,000; sh: 9,193; makefile: 309; ansic: 93; sed: 4
file content (29 lines) | stat: -rw-r--r-- 701 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ========================================================== //
// Time-stamp: <04 Sep 02 18:10:22 Jean-Guillaume.Dumas@imag.fr>
// ========================================================== //
#include <iostream>
using namespace std;
#include <stdlib.h>
#include <givaro/givintnumtheo.h>
#include <givaro/givtimer.h>


int main(int argc, char ** argv)
{
    IntNumTheoDom<> IP;
    IntNumTheoDom<>::Element a,q,o;
    if (argc > 1) a = Integer(argv[1]); else cin >> a;
    if (argc > 2) q = Integer(argv[2]); else cin >> q;

    Timer tim; tim.clear(); tim.start();
	// Ordre de a dans GF(q)
    IP.order(o, a, q);
    tim.stop();

    cout << o << endl;
    cerr << tim << endl;

    return 0;
}