source: git/factory/cf_gcd_smallp.h @ 911444

spielwiese
Last change on this file since 911444 was 911444, checked in by Hans Schoenemann <hannes@…>, 14 years ago
some syntax fixes git-svn-id: file:///usr/local/Singular/svn/trunk@12877 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 2.1 KB
Line 
1#ifndef CF_GCD_SMALL_H
2#define CF_GCD_SMALL_H
3// -*- c++ -*-
4//*****************************************************************************
5/** @file cf_gcd_smallp.h
6 *
7 * @author Martin Lee   
8 * @date   22.10.2009
9 *
10 * This file defines the functions GCD_Fp_extension which computes the GCD of
11 * two polynomials over \f$ F_{p}(\alpha ) \f$ , GCD_small_p which computes the
12 * GCD of two polynomials over  \f$ F_{p} \f$ , and GCD_GF which computes the
13 * GCD of two polynomials over GF. Algorithms are based on "On the Genericity of
14 * the Modular Polynomial GCD Algorithm" by E. Kaltofen & M. Monagan
15 *
16 * @par Copyright:
17 *   (c) by The SINGULAR Team, see LICENSE file
18 *
19 * @internal
20 * @version \$Id$
21 *
22**/
23//*****************************************************************************
24
25#include <config.h>
26#include "assert.h"
27
28CanonicalForm GCD_Fp_extension (const CanonicalForm& F, const CanonicalForm& G,
29                  Variable & alpha, CFList& l, bool& top_level);
30
31/// GCD of A and B over \f$ F_{p}(\alpha ) \f$
32static inline CanonicalForm GCD_Fp_extension (const CanonicalForm& A, const CanonicalForm& B, 
33                                Variable & alpha) 
34{
35  CFList list;
36  bool top_level= true;
37  return GCD_Fp_extension (A, B, alpha, list, top_level);
38}
39
40
41CanonicalForm GCD_small_p (const CanonicalForm& F, const CanonicalForm&  G,
42                           bool& top_level, CFList& l);
43
44///GCD of A and B over \f$ F_{p} \f$
45static inline CanonicalForm GCD_small_p (const CanonicalForm& A, const CanonicalForm& B)
46{
47  CFList list;
48  bool top_level= true;
49  return GCD_small_p (A, B, top_level, list);
50}
51
52CanonicalForm GCD_GF (const CanonicalForm& F, const CanonicalForm& G, CFList& l,
53        bool& top_level);
54
55/// GCD of A and B over GF
56static inline CanonicalForm GCD_GF (const CanonicalForm& A, const CanonicalForm& B) 
57{
58  ASSERT (CFFactory::gettype() == GaloisFieldDomain, 
59          "GF as base field expected");
60  CFList list;
61  bool top_level= true;
62  return GCD_GF (A, B, list, top_level);
63}
64
65CanonicalForm
66randomIrredpoly (int i, const Variable & x) ;
67#endif
Note: See TracBrowser for help on using the repository browser.