Changeset 405ebc in git for libfac/charset/algfactor.cc


Ignore:
Timestamp:
Jun 27, 2001, 3:58:06 PM (23 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
409020f4846b2e67e3e541d8288ef4e479652c98
Parents:
c7bbf368257aae665cbcd55c9a3d18af43aa3dc0
Message:
*hannes/GP: debug newfactoras, char_series, ...


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

Legend:

Unmodified
Added
Removed
  • libfac/charset/algfactor.cc

    rc7bbf3 r405ebc  
    33// emacs edit mode for this file is -*- C++ -*-
    44////////////////////////////////////////////////////////////
    5 static char * rcsid = "$Id: algfactor.cc,v 1.4 2001-06-21 14:57:04 Singular Exp $";
     5static char * rcsid = "$Id: algfactor.cc,v 1.5 2001-06-27 13:58:05 Singular Exp $";
    66////////////////////////////////////////////////////////////
    77// FACTORY - Includes
     
    2828#include "timing.h"
    2929TIMING_DEFINE_PRINT(newfactoras_time);
     30
     31int hasVar(const CanonicalForm &f, const Variable &v);
    3032
    3133static CFFList
     
    146148  // check trivial case:
    147149  if ( degree(f, order.getLast())==0 || degree(g, order.getLast())==0)
     150  {
     151    DEBOUTLN(cout, "algcd Result= ", 1);
    148152    return CanonicalForm(1);
    149 
     153  }
    150154
    151155  CFList bs; bs.append(f); bs.append(g);
     
    163167  {
    164168    result= cs.getLast();
    165     result/=result.Lc();
     169    CanonicalForm c=vcontent(result,Variable(1));
     170    //CanonicalForm c=result.Lc();
     171    result/=c;
     172    for(CFListIterator i=as;i.hasItem(); i++ )
     173    {
     174      if(hasVar(result,i.getItem().mvar()))
     175      {
     176        c=vcontent(result,Variable(i.getItem().level()+1));
     177        result/=c;
     178      }
     179    }
    166180  }
    167181  else result= CanonicalForm(1);
    168   DEBOUTLN(cout, "Result= ", result);
     182  DEBOUTLN(cout, "algcd Result= ", result);
    169183  return result;
    170184}
     
    340354    DEBOUT(cout, ",", fp(substback,vf));
    341355    DEBOUT(cout, ") over K_r wrt ", vf);
    342     //cout << "algcd(" << g << "," << fp(substback,vf) << " as:" << as <<endl;
    343356    fp= algcd(g,fp(substback,vf), as, oldord);
    344     //cout << "algcd res:" << fp << endl;
    345357    DEBOUTLN(cout, " = ", fp);
    346358    if ( degree(fp,vf) > 0 ){ //otherwise it's a constant
     
    360372    DEBOUT(cout, ",", fp(substback,vf));
    361373    DEBOUT(cout, ") over K_r wrt ", vf);
    362     //cout << "algcd(" << g << "," << fp(substback,vf) << " as:" << as <<endl;
    363374    fp= algcd(g,fp(substback,vf), as, oldord);
    364     //cout << "algcd res:" << fp << endl;
    365375    DEBOUTLN(cout, " = ", fp);
    366376    if ( degree(fp,vf) > 0 ){ //otherwise it's a constant
     
    438448/*
    439449$Log: not supported by cvs2svn $
     450Revision 1.4  2001/06/21 14:57:04  Singular
     451*hannes/GP: Factorize, newfactoras, ...
     452
    440453Revision 1.3  2001/06/18 08:44:40  pfister
    441454* hannes/GP/michael: factory debug, Factorize
Note: See TracChangeset for help on using the changeset viewer.