Givaro
Public Member Functions
Poly1PadicDom< Domain, Dense > Class Template Reference

Poly1 p-adic. More...

#include <givpoly1padic.h>

+ Inheritance diagram for Poly1PadicDom< Domain, Dense >:
+ Collaboration diagram for Poly1PadicDom< Domain, Dense >:

Public Member Functions

bool isDivisor (const Rep &P, const Element &Q) const
 isDivisor (a, b) Tests if Q | P (that is if P mod Q == 0).
 
Repsetdegree (Rep &P) const
 Compute the degree of P. More...
 
size_t & sqrfree (size_t &Nfact, Rep *Fact, const Rep &P) const
 Sqrfree decomposition. More...
 
bool isUnit (const Rep &x) const
 isUnit
 
bool isDivisor (const Element &a, const Element &b) const
 isDivisor (a, b) Test if b | a.
 
Arithmetic Operations

The first argument is set and is also the return value.

Elementmul (Element &x, const Element &y, const Element &z) const
 x := y*z
 
Elementdiv (Element &x, const Element &y, const Element &z) const
 x := y/z
 
Elementmod (Element &x, const Element &y, const Element &z) const
 x := y mod z
 
Elementadd (Element &x, const Element &y, const Element &z) const
 x := y + z
 
Elementsub (Element &x, const Element &y, const Element &z) const
 x := y - z
 
Elementaxpy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := a*x + y
 
Elementmaxpy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := y - a*x
 
Elementmaxpyin (Element &z, const Element &a, const Element &x) const
 z := z - a*x
 
Elementaxmy (Element &z, const Element &a, const Element &x, const Element &y) const
 z := a*x - y
 
Elementaxpyin (Element &z, const Element &a, const Element &x) const
 z := a*x + z
 
Elementaxmyin (Element &z, const Element &a, const Element &x) const
 z := a*x - z
 
Elementneg (Element &x, const Element &y) const
 x := -y
 
Elementinv (Element &x, const Element &y) const
 x := 1/y
 
Inplace Arithmetic Operations

The first argument is modified and the result is the return value.

Elementmulin (Element &x, const Element &y) const
 x := x*y
 
Elementdivin (Element &x, const Element &y) const
 x := x/y
 
Elementmodin (Element &x, const Element &y) const
 x := x mod y
 
Elementaddin (Element &x, const Element &y) const
 x := x + y
 
Elementsubin (Element &x, const Element &y) const
 x := x - y
 
Elementnegin (Element &x) const
 x := -x
 
Elementinvin (Element &x) const
 x := 1/x
 
Comparison Predicates
bool areEqual (const Element &x, const Element &y) const
 x == y
 
Input/Output Operations
std::istream & read (std::istream &is) const
 Read field. More...
 
std::ostream & write (std::ostream &os, std::string F) const
 Read field. More...
 

Detailed Description

template<class Domain>
class Givaro::Poly1PadicDom< Domain, Dense >

Poly1 p-adic.

Member Function Documentation

◆ setdegree()

Poly1Dom< Domain, Dense >::Rep & setdegree ( Rep &  P) const
inlineinherited

Compute the degree of P.

Warning
this is an infamous function that may not leave P constant !!
Parameters
Ppolynomial

◆ sqrfree()

size_t & sqrfree ( size_t &  Nfact,
Rep *  Fact,
const Rep &  P 
) const
inherited

Sqrfree decomposition.

Decompose P such that: P = Fact[0]^0 * Fact[1]^1 * ... * Fact[P.degree()]^(P.degree()), with Fact[0] the leading coefficient. The array Fact must be allocated before calling the function. The size of Fact must be degP+1 is all factors should be computed. For more readeable version of the algorithm, see Geddes, p342.

Parameters
Nfact[in] the size of Fact
Fact[in] an array of dimension Nfact
Nfact[out] is the number of factor in the sqrfree decomposition
Fact[out] contains at most Nfact factors of the decomposition.
Prep.

◆ read()

std::istream& read ( std::istream &  is) const
inlineinherited

Read field.

Returns
input stream from which field is read.
Parameters
isinput stream from which field is read.

◆ write()

std::ostream& write ( std::ostream &  os,
std::string  F 
) const
inlineinherited

Read field.

Returns
input stream from which field is read.
Parameters
isinput stream from which field is read.

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