Changeset b6249e in git for libfac/factor


Ignore:
Timestamp:
Aug 22, 2001, 4:21:17 PM (23 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
72a88c4530caa33c125d6c39f6a6d78f00065e02
Parents:
28ffaa839e0746a838155fb491e13df051251c68
Message:
*hannes: added search for main var to Factorize


git-svn-id: file:///usr/local/Singular/svn/trunk@5597 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
libfac/factor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libfac/factor/Factor.cc

    r28ffaa rb6249e  
    11/* Copyright 1996 Michael Messollen. All rights reserved. */
    22///////////////////////////////////////////////////////////////////////////////
    3 static char * rcsid = "$Id: Factor.cc,v 1.10 2001-08-08 14:26:55 Singular Exp $ ";
     3static char * rcsid = "$Id: Factor.cc,v 1.11 2001-08-22 14:21:16 Singular Exp $ ";
    44static char * errmsg = "\nYou found a bug!\nPlease inform (Michael Messollen) michael@math.uni-sb.de \nPlease include above information and your input (the ideal/polynomial and characteristic) in your bug-report.\nThank you.";
    55///////////////////////////////////////////////////////////////////////////////
     
    726726//           * ensuring poly is sqrfree (n.y.i.)             //
    727727///////////////////////////////////////////////////////////////
     728int find_mvar(const CanonicalForm &f);
    728729CFFList
    729 Factorize( const CanonicalForm & F, int is_SqrFree ){
     730Factorize(const CanonicalForm & F, int is_SqrFree ){
    730731  CFFList Outputlist,SqrFreeList,Intermediatelist,Outputlist2;
    731732  ListIterator<CFFactor> i,j;
     
    756757  }
    757758  TIMING_START(factorize_time);
     759  // search an "optimal" main variavble
     760  int mv=F.level();
     761  if (! F.isUnivariate() )
     762  {
     763     mv=find_mvar(F);
     764     if (mv!=F.level())
     765     {
     766       swapvar(F,Variable(mv),F.mvar());
     767     }
     768  }
     769
    758770  ///////
    759771  // Maybe it`s better to add a sqrfree-test before?
     
    829841  Outputlist2.insert(CFFactor(r,1));
    830842
     843  if ((mv!=F.level()) && (! F.isUnivariate() ))
     844  {
     845    CFFListIterator J=Outputlist2;
     846    for ( ; J.hasItem(); J++)
     847    {
     848      swapvar(J.getItem().factor(),Variable(mv),F.mvar());
     849    }
     850    swapvar(F,Variable(mv),F.mvar());
     851  }
     852                                                                                         
    831853  DEBDECLEVEL(cout, "Factorize");
    832854  TIMING_END(factorize_time);
     
    843865/*
    844866$Log: not supported by cvs2svn $
     867Revision 1.10  2001/08/08 14:26:55  Singular
     868*hannes: Dan's HAVE_SINGULAR_ERROR
     869
    845870Revision 1.9  2001/08/08 11:59:12  Singular
    846871*hannes: Dan's NOSTREAMIO changes
  • libfac/factor/MVMultiHensel.cc

    r28ffaa rb6249e  
    22///////////////////////////////////////////////////////////////////////////////
    33// emacs edit mode for this file is -*- C++ -*-
    4 // static char * rcsid = "$Id: MVMultiHensel.cc,v 1.6 2001-08-08 14:26:55 Singular Exp $";
     4// static char * rcsid = "$Id: MVMultiHensel.cc,v 1.7 2001-08-22 14:21:17 Singular Exp $";
    55///////////////////////////////////////////////////////////////////////////////
    66// FACTORY - Includes
     
    112112  // Degrees ok? degree(F1,mainvar) + degree(F2,mainvar) <= i ?
    113113  if ( (degree(F1,levelU) + degree(F2,levelU) ) <= i ) {
    114 #ifdef factor/MVMultiHensel.cc
     114#ifdef HAVE_SINGULAR_ERROR
    115115    WerrorS("libfac: diophant ERROR: degree too large!  ");
    116116#else
     
    411411/*
    412412$Log: not supported by cvs2svn $
     413Revision 1.6  2001/08/08 14:26:55  Singular
     414*hannes: Dan's HAVE_SINGULAR_ERROR
     415
    413416Revision 1.5  2001/08/08 11:59:12  Singular
    414417*hannes: Dan's NOSTREAMIO changes
Note: See TracChangeset for help on using the changeset viewer.