Givaro
Public Member Functions
IntNumTheoDom< RandIter > Class Template Reference

Num theory Domain. More...

#include <givintnumtheo.h>

+ Inheritance diagram for IntNumTheoDom< RandIter >:

Public Member Functions

template<template< class, class > class Container, template< class > class Alloc>
Repphi (Rep &res, const Container< Rep, Alloc< Rep > > &Lf, const Rep &n) const
 Euler's phi function.
 
Repprim_root (Rep &, const Rep &) const
 Primitive Root.
 
template<class Array >
Repprim_root_of_prime (Rep &A, const Array &Lf, const Rep &phin, const Rep &n) const
 Add Jacobi for quadratic nonresidue.
 
Repprobable_prim_root (Rep &, double &, const Rep &n, const unsigned long L=10000000) const
 Polynomial-time generation of primitive roots. More...
 
Repprobable_prim_root (Rep &, double &, const Rep &n, const double epsilon) const
 Here L is computed so that the error is close to epsilon.
 
Repprim_inv (Rep &, const Rep &) const
 Generalization of primitive roots for any modulus Primitive means maximal order Primitive Element, Primitive invertible Both functions coïncides except for m=8. More...
 
template<template< class, class > class Container, template< class > class Alloc>
short mobius (const Container< Rep, Alloc< Rep > > &lpow) const
 Möbius function.
 
short mobius (const Rep &a) const
 Möbius function.
 
template<class Container1 , class Container2 >
bool set (Container1 &setint, Container2 &setpwd, const Rep &a, unsigned long loops=0) const
 Factors with primes.
 
RepErathostene (Rep &, const Rep &p) const
 returns a small factor
 

Detailed Description

template<class RandIter = GivRandom>
class Givaro::IntNumTheoDom< RandIter >

Num theory Domain.

Examples:
examples/Integer/isproot.C, examples/Integer/lambda.C, examples/Integer/lambda_inv.C, examples/Integer/order.C, examples/Integer/phi.C, examples/Integer/primitiveelement.C, examples/Integer/primitiveroot.C, and examples/Integer/probable_primroot.C.

Member Function Documentation

IntNumTheoDom< RandIter >::Rep & probable_prim_root ( Rep primroot,
double &  error,
const Rep n,
const unsigned long  L = 10000000 
) const

Polynomial-time generation of primitive roots.

L is number of loops of Pollard partial factorization of n-1 10,000,000 gives at least 1-2^{-40} probability of success [Dubrois & Dumas, Industrial-strength primitive roots] Returns the probable primitive root and the probability of error.

IntNumTheoDom< RandIter >::Rep & prim_inv ( Rep A,
const Rep n 
) const

Generalization of primitive roots for any modulus Primitive means maximal order Primitive Element, Primitive invertible Both functions coïncides except for m=8.

Lambda Function : maximal orbit size lambda : Order of a primitive Element lambda_inv : Order of an invertible primitive Element Both functions coïncides except for m=8


The documentation for this class was generated from the following files: