Changeset e2ca88 in git for libfac/factor/homogfactor.cc


Ignore:
Timestamp:
May 16, 2006, 4:46:50 PM (18 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
55abfc3008e047e8f26beaeb76b5bab66cfe8288
Parents:
dbcf42a937f51948f4de74902429b68c1b54592b
Message:
*hannes: gcc 4.1 fixes


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

Legend:

Unmodified
Added
Removed
  • libfac/factor/homogfactor.cc

    rdbcf42a re2ca88  
    11/* Copyright 1997 Michael Messollen. All rights reserved. */
    22////////////////////////////////////////////////////////////
    3 // static char * rcsid = "$Id: homogfactor.cc,v 1.6 2005-12-09 08:36:11 Singular Exp $ ";
     3// static char * rcsid = "$Id: homogfactor.cc,v 1.7 2006-05-16 14:46:50 Singular Exp $ ";
    44////////////////////////////////////////////////////////////
    55// FACTORY - Includes
    66#include <factory.h>
     7#ifdef HAVE_IOSTREAM
     8#include <iostream>
     9#define OSTREAM std::ostream
     10#define ISTREAM std::istream
     11#define CERR std::cerr
     12#define CIN std::cin
     13#elif defined(HAVE_IOSTREAM_H)
     14#include <iostream.h>
     15#define OSTREAM ostream
     16#define ISTREAM istream
     17#define CERR cerr
     18#define CIN cin
     19#endif
     20
    721// Factor - Includes
    822#include "tmpl_inst.h"
     
    121135CFFList
    122136HomogFactor( const CanonicalForm & g, const CanonicalForm  & minpoly, const int Mainvar ){
    123   DEBINCLEVEL(cout, "HomogFactor");
     137  DEBINCLEVEL(CERR, "HomogFactor");
    124138  Variable xn = get_max_degree_Variable(g);
    125139  int d_xn = degree(g,xn);
     
    127141  CanonicalForm F = compress(g(1,xn),n); // must compress F!
    128142
    129   DEBOUTLN(cout, "xn= ", xn);
    130   DEBOUTLN(cout, "d_xn=   ", d_xn);
    131   DEBOUTLN(cout, "F= ", F); 
     143  DEBOUTLN(CERR, "xn= ", xn);
     144  DEBOUTLN(CERR, "d_xn=   ", d_xn);
     145  DEBOUTLN(CERR, "F= ", F); 
    132146
    133147  // should we do this for low degree polys g ? e.g. quadratic?
     
    143157    Homoglist.append(CFFactor( n(j.getItem().factor()), j.getItem().exp()) );
    144158  // Now we have uncompressed factors in Homoglist
    145   DEBOUTLN(cout, "F factors as: ", Homoglist);
     159  DEBOUTLN(CERR, "F factors as: ", Homoglist);
    146160  CFFList Unhomoglist;
    147161  CanonicalForm unhomogelem;
    148162  for ( j=Homoglist; j.hasItem(); j++ ){
    149     DEBOUTLN(cout, "Homogenizing ",j.getItem().factor());
     163    DEBOUTLN(CERR, "Homogenizing ",j.getItem().factor());
    150164    unhomogelem= homogenize(j.getItem().factor(),xn);
    151     DEBOUTLN(cout, "      that is ", unhomogelem);
     165    DEBOUTLN(CERR, "      that is ", unhomogelem);
    152166    Unhomoglist.append(CFFactor(unhomogelem,j.getItem().exp()));
    153167    d_xn -= degree(unhomogelem,xn)*j.getItem().exp();
    154168  }
    155   DEBOUTLN(cout, "Power of xn to append is ", d_xn);
     169  DEBOUTLN(CERR, "Power of xn to append is ", d_xn);
    156170  if ( d_xn != 0 ) // have to append xn^(d_xn)
    157171    Unhomoglist.append(CFFactor(CanonicalForm(xn),d_xn));
    158172
    159   DEBDECLEVEL(cout, "HomogFactor");
     173  DEBDECLEVEL(CERR, "HomogFactor");
    160174  return Unhomoglist;
    161175}
     
    163177/*
    164178$Log: not supported by cvs2svn $
     179Revision 1.6  2005/12/09 08:36:11  Singular
     180*hannes: stuff for homog. polys ->factory
     181
    165182Revision 1.5  2005/12/05 15:47:32  Singular
    166183*hannes: is_homogeneous -> factory: isHomogeneous
Note: See TracChangeset for help on using the changeset viewer.