My Project
|
#include "config.h"
#include "cf_assert.h"
#include "cf_defs.h"
#include "canonicalform.h"
#include "cf_iter.h"
#include "fac_sqrfree.h"
#include "cf_algorithm.h"
#include <string.h>
#include <NTL/ZZXFactoring.h>
#include <NTL/ZZ_pXFactoring.h>
#include <NTL/lzz_pXFactoring.h>
#include <NTL/GF2XFactoring.h>
#include <NTL/ZZ_pEXFactoring.h>
#include <NTL/lzz_pEXFactoring.h>
#include <NTL/GF2EXFactoring.h>
#include <NTL/tools.h>
#include <NTL/mat_ZZ.h>
#include <NTL/version.h>
#include "int_int.h"
#include <limits.h>
#include "NTLconvert.h"
Go to the source code of this file.
Macros | |
#define | Alloc(L) omAlloc(L) |
#define | Free(A, L) omFreeSize(A,L) |
Variables | |
VAR long | fac_NTL_char = -1 |
STATIC_VAR unsigned char * | cf_stringtemp |
STATIC_VAR unsigned long | cf_stringtemp_l =0L |
#define Alloc | ( | L | ) | omAlloc(L) |
Definition at line 36 of file NTLconvert.cc.
#define Free | ( | A, | |
L | |||
) | omFreeSize(A,L) |
Definition at line 37 of file NTLconvert.cc.
GF2EX convertFacCF2NTLGF2EX | ( | const CanonicalForm & | f, |
const GF2X & | mipo | ||
) |
CanonicalForm in Z_2(a)[X] to NTL GF2EX.
Definition at line 1007 of file NTLconvert.cc.
GF2X convertFacCF2NTLGF2X | ( | const CanonicalForm & | f | ) |
NAME: convertFacCF2NTLGF2X.
DESCRIPTION: Conversion routine for Factory-type canonicalform into GF2X of NTL, i.e. polynomials over F_2. As precondition for correct execution, the characteristic must equal two. This is a special case of the more general conversion routine for canonicalform to ZZpX. It is included because NTL provides additional support and faster algorithms over F_2, moreover the conversion code can be optimized, because certain steps are either completely obsolent (like normalizing the polynomial) or they can be made significantly faster (like building up the NTL-polynomial).
INPUT: A canonicalform f OUTPUT: The converted NTL-polynomial over F_2 of type GF2X
Definition at line 184 of file NTLconvert.cc.
ZZ convertFacCF2NTLZZ | ( | const CanonicalForm & | f | ) |
NAME: convertFacCF2NTLZZX.
DESCRIPTION: Routine for conversion of canonicalforms in Factory to polynomials of type ZZX of NTL. To guarantee the correct execution of the algorithm the characteristic has to equal zero.
INPUT: The canonicalform that has to be converted OUTPUT: The converted NTL-polynom of type ZZX
Definition at line 670 of file NTLconvert.cc.
ZZ_pEX convertFacCF2NTLZZ_pEX | ( | const CanonicalForm & | f, |
const ZZ_pX & | mipo | ||
) |
CanonicalForm in Z_p(a)[X] to NTL ZZ_pEX.
Definition at line 1037 of file NTLconvert.cc.
zz_pEX convertFacCF2NTLzz_pEX | ( | const CanonicalForm & | f, |
const zz_pX & | mipo | ||
) |
Definition at line 1064 of file NTLconvert.cc.
ZZ_pX convertFacCF2NTLZZpX | ( | const CanonicalForm & | f | ) |
NAME: convertFacCF2NTLZZpX.
DESCRIPTION: Conversion routine for Factory-type canonicalform into ZZpX of NTL, i.e. polynomials over F_p. As a precondition for correct execution, the characteristic has to a a prime number.
INPUT: A canonicalform f OUTPUT: The converted NTL-polynomial over F_p of type ZZpX
Definition at line 64 of file NTLconvert.cc.
zz_pX convertFacCF2NTLzzpX | ( | const CanonicalForm & | f | ) |
Definition at line 105 of file NTLconvert.cc.
ZZX convertFacCF2NTLZZX | ( | const CanonicalForm & | f | ) |
Definition at line 691 of file NTLconvert.cc.
Definition at line 1138 of file NTLconvert.cc.
Definition at line 1167 of file NTLconvert.cc.
Definition at line 1196 of file NTLconvert.cc.
CanonicalForm convertNTLGF2E2CF | ( | const GF2E & | coefficient, |
const Variable & | x | ||
) |
NAME: convertNTLGF2E2CF.
DESCRIPTION: Routine for conversion of elements of extensions of GF2, having type GF2E, of NTL to their corresponding values of type canonicalform in Factory. To guarantee the correct execution of the algorithm, the characteristic must equal two and Factory has to compute in an extension of F_2. As usual this is an optimized special case of the more general conversion routine from ZZpE to Factory.
INPUT: The coefficient of type GF2E and the variable x indicating the main variable of the computed canonicalform OUTPUT: The converted value of coefficient as type canonicalform
Definition at line 932 of file NTLconvert.cc.
CanonicalForm convertNTLGF2X2CF | ( | const GF2X & | poly, |
const Variable & | x | ||
) |
NAME: convertNTLGF2X2CF.
DESCRIPTION: Conversion routine for NTL-Type GF2X to Factory-Type canonicalform, the routine is again an optimized special case of the more general conversion to ZZpX. Additionally a variable x is needed as a parameter indicating the main variable of the computed canonicalform. To guarantee the correct execution of the algorithm the characteristic has a be an arbitrary prime number.
INPUT: A canonicalform f, a variable x OUTPUT: The converted Factory-polynomial of type canonicalform, built by the main variable x
Definition at line 322 of file NTLconvert.cc.
Definition at line 1153 of file NTLconvert.cc.
Definition at line 1212 of file NTLconvert.cc.
CFFList convertNTLvec_pair_GF2EX_long2FacCFFList | ( | const vec_pair_GF2EX_long & | e, |
const GF2E & | cont, | ||
const Variable & | x, | ||
const Variable & | alpha | ||
) |
NAME: convertNTLvec_pair_GF2EX_long2FacCFFList.
DESCRIPTION: Routine for converting a vector of polynomials from GF2EX to a CFFList of Factory. This routine will be used after a successful factorization of NTL to convert the result back to Factory. This is a special, but optimized case of the more general conversion from ZZpE to canonicalform. Additionally a variable x and the computed content, as a type GF2E of NTL, is needed as parameters indicating the main variable of the computed canonicalform and the content of the original polynomial. To guarantee the correct execution of the algorithm the characteristic has to equal two and computations have to be done in an extention of F_2.
INPUT: A vector of polynomials over GF2E of type vec_pair_GF2EX_long and a variable x and a content of type GF2E OUTPUT: The converted list of polynomials of type CFFList, all polynomials have x as their main variable
Definition at line 958 of file NTLconvert.cc.
CFFList convertNTLvec_pair_GF2X_long2FacCFFList | ( | const vec_pair_GF2X_long & | e, |
GF2 | cont, | ||
const Variable & | x | ||
) |
NAME: convertNTLvec_pair_GF2X_long2FacCFFList.
DESCRIPTION: Routine for converting a vector of polynomials of type GF2X from NTL to a list CFFList of Factory. This routine will be used after a successful factorization of NTL to convert the result back to Factory. As usual this is simply a special case of the more general conversion routine but again speeded up by leaving out unnecessary steps. Additionally a variable x and the computed content, as type GF2 of NTL, are needed as parameters indicating the main variable of the computed canonicalform and the content of the original polynomial. To guarantee the correct execution of the algorithm the characteristic has a be an arbitrary prime number.
INPUT: A vector of polynomials over GF2 of type vec_pair_GF2X_long and a variable x and a content of type GF2 OUTPUT: The converted list of polynomials of type CFFList, all polynomials have x as their main variable
Definition at line 445 of file NTLconvert.cc.
CFFList convertNTLvec_pair_ZZpEX_long2FacCFFList | ( | const vec_pair_ZZ_pEX_long & | e, |
const ZZ_pE & | cont, | ||
const Variable & | x, | ||
const Variable & | alpha | ||
) |
NAME: convertNTLvec_pair_ZZpEX_long2FacCFFList.
DESCRIPTION: Routine for converting a vector of polynomials from ZZpEX to a CFFList of Factory. This routine will be used after a successful factorization of NTL to convert the result back to Factory. Additionally a variable x and the computed content, as a type ZZpE of NTL, is needed as parameters indicating the main variable of the computed canonicalform and the content of the original polynomial. To guarantee the correct execution of the algorithm the characteristic has a be an arbitrary prime number p and computations have to be done in an extention of F_p.
INPUT: A vector of polynomials over ZZpE of type vec_pair_ZZ_pEX_long and a variable x and a content of type ZZpE OUTPUT: The converted list of polynomials of type CFFList, all polynomials have x as their main variable
Definition at line 825 of file NTLconvert.cc.
CFFList convertNTLvec_pair_zzpEX_long2FacCFFList | ( | const vec_pair_zz_pEX_long & | e, |
const zz_pE & | cont, | ||
const Variable & | x, | ||
const Variable & | alpha | ||
) |
Definition at line 870 of file NTLconvert.cc.
CFFList convertNTLvec_pair_ZZpX_long2FacCFFList | ( | const vec_pair_ZZ_pX_long & | e, |
const ZZ_p & | cont, | ||
const Variable & | x | ||
) |
NAME: convertNTLvec_pair_ZZpX_long2FacCFFList.
DESCRIPTION: Routine for converting a vector of polynomials from ZZpX to a CFFList of Factory. This routine will be used after a successful factorization of NTL to convert the result back to Factory.
Additionally a variable x and the computed content, as a type ZZp of NTL, is needed as parameters indicating the main variable of the computed canonicalform and the conent of the original polynomial. To guarantee the correct execution of the algorithm the characteristic has a be an arbitrary prime number.
INPUT: A vector of polynomials over ZZp of type vec_pair_ZZ_pX_long and a variable x and a content of type ZZp OUTPUT: The converted list of polynomials of type CFFList, all polynomials have x as their main variable
Definition at line 373 of file NTLconvert.cc.
CFFList convertNTLvec_pair_zzpX_long2FacCFFList | ( | const vec_pair_zz_pX_long & | e, |
const zz_p | cont, | ||
const Variable & | x | ||
) |
Definition at line 398 of file NTLconvert.cc.
CFFList convertNTLvec_pair_ZZX_long2FacCFFList | ( | const vec_pair_ZZX_long & | e, |
const ZZ & | cont, | ||
const Variable & | x | ||
) |
NAME: convertNTLvec_pair_ZZX_long2FacCFFList.
DESCRIPTION: Routine for converting a vector of polynomials from ZZ to a list CFFList of Factory. This routine will be used after a successful factorization of NTL to convert the result back to Factory. Additionally a variable x and the computed content, as a type ZZ of NTL, is needed as parameters indicating the main variable of the computed canonicalform and the content of the original polynomial. To guarantee the correct execution of the algorithm the characteristic has to equal zero.
INPUT: A vector of polynomials over ZZ of type vec_pair_ZZX_long and a variable x and a content of type ZZ OUTPUT: The converted list of polynomials of type CFFList, all have x as their main variable
Definition at line 753 of file NTLconvert.cc.
Definition at line 1092 of file NTLconvert.cc.
Definition at line 1115 of file NTLconvert.cc.
CanonicalForm convertNTLZZpE2CF | ( | const ZZ_pE & | coefficient, |
const Variable & | x | ||
) |
NAME: convertNTLZZpX2CF.
DESCRIPTION: Routine for conversion of elements of arbitrary extensions of ZZp, having type ZZpE, of NTL to their corresponding values of type canonicalform in Factory. To guarantee the correct execution of the algorithm the characteristic has to be an arbitrary prime number and Factory has to compute in an extension of F_p.
INPUT: The coefficient of type ZZpE and the variable x indicating the main// variable of the computed canonicalform OUTPUT: The converted value of coefficient as type canonicalform
Definition at line 795 of file NTLconvert.cc.
CanonicalForm convertNTLzzpE2CF | ( | const zz_pE & | coefficient, |
const Variable & | x | ||
) |
Definition at line 799 of file NTLconvert.cc.
CanonicalForm convertNTLZZpX2CF | ( | const ZZ_pX & | poly, |
const Variable & | x | ||
) |
NAME: convertNTLZZpX2CF.
DESCRIPTION: Conversion routine for NTL-Type ZZpX to Factory-Type canonicalform. Additionally a variable x is needed as a parameter indicating the main variable of the computed canonicalform. To guarantee the correct execution of the algorithm, the characteristic has a be an arbitrary prime number.
INPUT: A canonicalform f, a variable x OUTPUT: The converted Factory-polynomial of type canonicalform, built by the main variable x
Definition at line 250 of file NTLconvert.cc.
CanonicalForm convertNTLzzpX2CF | ( | const zz_pX & | poly, |
const Variable & | x | ||
) |
Definition at line 255 of file NTLconvert.cc.
CanonicalForm convertNTLZZX2CF | ( | const ZZX & | polynom, |
const Variable & | x | ||
) |
Definition at line 285 of file NTLconvert.cc.
CanonicalForm convertZZ2CF | ( | const ZZ & | a | ) |
NAME: convertZZ2CF.
DESCRIPTION: Routine for conversion of integers represented in NTL as Type ZZ to integers in Factory represented as canonicalform. To guarantee the correct execution of the algorithm the characteristic has to equal zero.
INPUT: The value coefficient of type ZZ that has to be converted OUTPUT: The converted Factory-integer of type canonicalform
Definition at line 495 of file NTLconvert.cc.
void out_cf | ( | const char * | s1, |
const CanonicalForm & | f, | ||
const char * | s2 | ||
) |
cf_algorithm.cc - simple mathematical algorithms.
Hierarchy: mathematical algorithms on canonical forms
A "mathematical" algorithm is an algorithm which calculates some mathematical function in contrast to a "structural" algorithm which gives structural information on polynomials.
Compare these functions to the functions in ‘cf_ops.cc’, which are structural algorithms.
Definition at line 99 of file cf_factor.cc.
STATIC_VAR unsigned char* cf_stringtemp |
Definition at line 480 of file NTLconvert.cc.
STATIC_VAR unsigned long cf_stringtemp_l =0L |
Definition at line 481 of file NTLconvert.cc.
VAR long fac_NTL_char = -1 |
Definition at line 46 of file NTLconvert.cc.