From 1929c746527258c9af12da4c07154587f3e75d3b Mon Sep 17 00:00:00 2001 From: tprest Date: Sat, 21 Mar 2015 17:04:48 +0100 Subject: [PATCH] Create Algebra.h --- Algebra.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Algebra.h diff --git a/Algebra.h b/Algebra.h new file mode 100644 index 0000000..3a79093 --- /dev/null +++ b/Algebra.h @@ -0,0 +1,24 @@ +#ifndef LIBE_ALGEBRA_H +#define LIBE_ALGEBRA_H + +#include "params.h" + +ZZX Cyclo(); +ZZX FastMod(const ZZX& f); +ZZ SquaredNorm(const ZZX& f, const unsigned int degree); +void ValidPair(ZZ& PGCD, ZZ& Alpha, ZZ& Beta, ZZX& rho_f, ZZX& rho_g, const ZZX& f, const ZZX& g); +ZZX Reverse(const ZZX& f); +ZZX ReductionCoefficient(const ZZX& f, const ZZX& g, const ZZX& F, const ZZX& G, unsigned int & mb); +ZZX FastReductionCoefficient(const ZZX& f, const ZZX& g, const ZZX& F, const ZZX& G); +mat_ZZ AnticircularMatrix(const ZZX& f); +mat_ZZ BasisFromPolynomials(const ZZX& f, const ZZX& g, const ZZX& F, const ZZX& G); +ZZ_pX Inverse(const ZZX& f); +ZZ_pX Quotient(const ZZX& f, const ZZX& g); +void GS_Norm(const ZZX fx, const ZZX gx, int& flag); +void GenerateBasis(ZZX& f, ZZX& g, ZZX& F, ZZX& G, const ZZ& Norme); +RR_t DotProduct(const RR_t * x1, const RR_t * x2); +void Rotate(RR_t * const dest, RR_t const * const src); +void ClassicMGS(RR_t Bstar[2*N0][2*N0], const RR_t B[2*N0][2*N0]); +void FastMGS(RR_t Bst[2*N0][2*N0], const RR_t B[2*N0][2*N0]); + +#endif