Changeset 146c603 in git for libpolys/polys/ext_fields


Ignore:
Timestamp:
Nov 9, 2011, 10:13:02 AM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
8f40312428677d88ab37a31824f2ec53f144a18a
Parents:
fc497757365979d0168460de9969b49bc49c53f2
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2011-11-09 10:13:02+01:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:14:12+01:00
Message:
fix: nlModP (should not use nvDiv/npDiv
implement conversion to/from factory for algext
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/ext_fields/algext.cc

    rfc4977 r146c603  
    4444#include <polys/simpleideals.h>
    4545
     46#ifdef HAVE_FACTORY
     47#include <polys/clapconv.h>
     48#include <factory/factory.h>
     49#endif
     50
    4651#include "ext_fields/algext.h"
    4752#define TRANSEXT_PRIVATES 1
     
    522527}
    523528
     529void  naNormalize(number &a, const coeffs cf)
     530{
     531  poly aa=(poly)a;
     532  definiteReduce(aa,naMinpoly,cf);
     533  a=(number)aa;
     534}
     535
     536#ifdef HAVE_FACTORY
     537number naConvFactoryNSingN( const CanonicalForm n, const coeffs cf)
     538{
     539  if (n.isZero()) return NULL;
     540  poly p=convFactoryPSingP(n,naRing);
     541  return (number)p;
     542}
     543CanonicalForm naConvSingNFactoryN( number n, BOOLEAN setChar, const coeffs cf )
     544{
     545  naTest(n);
     546  if (n==NULL) return CanonicalForm(0);
     547
     548  return convSingPFactoryP((poly)n,naRing);
     549}
     550#endif
     551
     552
    524553/* IMPORTANT NOTE: Since an algebraic field extension is again a field,
    525554                   the gcd of two elements is not very interesting. (It
     
    735764  cf->cfImPart       = naImPart;
    736765  cf->cfCoeffWrite   = naCoeffWrite;
     766  cf->cfNormalize    = naNormalize;
    737767#ifdef LDEBUG
    738768  cf->cfDBTest       = naDBTest;
     
    744774  cf->cfInvers       = naInvers;
    745775  cf->cfIntDiv       = naDiv;
     776#ifdef HAVE_FACTORY
     777  cf->convFactoryNSingN=naConvFactoryNSingN;
     778  cf->convSingNFactoryN=naConvSingNFactoryN;
     779#endif
    746780 
    747781  return FALSE;
Note: See TracChangeset for help on using the changeset viewer.