Changeset b1326b in git for factory/cf_factor.cc


Ignore:
Timestamp:
Aug 28, 2003, 1:54:32 PM (21 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
4bc9c25c9a8c589240a894844cee71be5220ee1b
Parents:
9b1e4c9febca790a3b9509dfd1c33492e29780fb
Message:
*hannes: NTL update, missing funtions for GF2E


git-svn-id: file:///usr/local/Singular/svn/trunk@6869 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/cf_factor.cc

    r9b1e4c rb1326b  
    11/* emacs edit mode for this file is -*- C++ -*- */
    2 /* $Id: cf_factor.cc,v 1.19 2003-02-14 15:53:27 Singular Exp $ */
     2/* $Id: cf_factor.cc,v 1.20 2003-08-28 11:54:32 Singular Exp $ */
    33
    44//{{{ docu
     
    373373  #ifdef HAVE_NTL
    374374  //if  (isOn(SW_USE_NTL))
    375   if (isOn(SW_USE_NTL) && (isPurePoly(f,alpha)))
     375  if (isOn(SW_USE_NTL) /*&& (isPurePoly(f,alpha))*/)
    376376  {
    377377    //USE NTL
     
    410410
    411411      // remainder is two ==> nothing to do
     412      // set remainder
     413      ZZ r;
     414      r=getCharacteristic();
     415      ZZ_pContext ccc(r);
     416      ccc.restore();
    412417
    413418      // set minimal polynomial in NTL using the optimized conversion routines for characteristic 2
     
    417422
    418423      // convert to NTL again using the faster conversion routines
    419       GF2X f_tmp=convertFacCF2NTLGF2X(f);
    420       GF2EX f1=to_GF2EX(f_tmp);
    421 
    422       // no make monic necessary in GF2
     424      GF2EX f1;
     425      if (isPurePoly(f))
     426      {
     427        GF2X f_tmp=convertFacCF2NTLGF2X(f);
     428        f1=to_GF2EX(f_tmp);
     429      }
     430      else
     431      {
     432        f1=convertFacCF2NTLGF2EX(f,minPo);
     433      }
     434
     435      // make monic (in Z/2(a))
     436      GF2E f1_coef=LeadCoeff(f1);
     437      MakeMonic(f1);
    423438
    424439      // factorize using NTL
     
    427442
    428443      // return converted result
    429       F=convertNTLvec_pair_GF2EX_long2FacCFFList(factors,LeadCoeff(f1),f.mvar(),alpha);
     444      F=convertNTLvec_pair_GF2EX_long2FacCFFList(factors,f1_coef,f.mvar(),alpha);
    430445    }
    431446
Note: See TracChangeset for help on using the changeset viewer.