source: git/factory/cfGcdAlgExt.h

spielwiese
Last change on this file was eccae7, checked in by Hans Schoenemann <hannes@…>, 2 years ago
fix: memeory leak with leadDeg in tryBrownGCD
  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 * @file cfGcdAlgExt.h
3 *
4 * GCD over Q(a)
5 *
6 * ABSTRACT: Implementation of Encarnacion's GCD algorithm over number fields,
7 * see M.J. Encarnacion "Computing GCDs of polynomials over number fields",
8 * extended to the multivariate case.
9 *
10 * @sa cfNTLzzpEXGCD.h
11**/
12
13#ifndef CF_GCD_ALGEXT_H
14#define CF_GCD_ALGEXT_H
15
16// #include "config.h"
17
18#include "canonicalform.h"
19#include "variable.h"
20
21/// gcd over Q(a)
22CanonicalForm QGCD( const CanonicalForm &, const CanonicalForm & );
23
24#ifndef HAVE_NTL
25void tryDivrem (const CanonicalForm&, const CanonicalForm&, CanonicalForm&,
26                CanonicalForm&, CanonicalForm&, const CanonicalForm&,
27                bool&);
28void tryEuclid( const CanonicalForm &, const CanonicalForm &, const CanonicalForm &, CanonicalForm &, bool & );
29void tryExtgcd( const CanonicalForm & F, const CanonicalForm & G, const CanonicalForm& M, CanonicalForm & result, CanonicalForm & s, CanonicalForm & t, bool & fail );
30#endif
31void tryInvert( const CanonicalForm &, const CanonicalForm &, CanonicalForm &, bool & );
32
33/// modular gcd over F_p[x]/(M) for not necessarily irreducible M.
34/// If a zero divisor is encountered fail is set to true.
35void tryBrownGCD( const CanonicalForm & F, const CanonicalForm & G, const CanonicalForm & M, CanonicalForm & result, bool & fail, bool topLevel= true );
36
37bool isLess(int *a, int *b, int lower, int upper);
38bool isEqual(int *a, int *b, int lower, int upper);
39CanonicalForm firstLC(const CanonicalForm & f);
40
41#endif
42
Note: See TracBrowser for help on using the repository browser.