Changeset e99734 in git


Ignore:
Timestamp:
Mar 24, 2005, 11:54:30 AM (19 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
81a6f28ef505d3aed265bb5df75a2afd0eec4ed6
Parents:
60467b0cdcbd1fee1d59e683e7ee53b317a29d23
Message:
*hannes: reduce if a new minpoly is defined


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

Legend:

Unmodified
Added
Removed
  • Singular/ipassign.cc

    r60467b re99734  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ipassign.cc,v 1.71 2004-04-13 15:38:26 Singular Exp $ */
     4/* $Id: ipassign.cc,v 1.72 2005-03-24 10:54:19 Singular Exp $ */
    55
    66/*
     
    115115  return FALSE;
    116116}
     117static void jjMINPOLY_red(idhdl h)
     118{
     119  switch(IDTYP(h))
     120  {
     121    case NUMBER_CMD:
     122    {
     123      number n=(number)IDDATA(h);
     124      number one = nInit(1);
     125      number nn=nMult(n,one);
     126      nDelete(&n);nDelete(&one);
     127      IDDATA(h)=(char*)nn;
     128      break;
     129    }
     130    case VECTOR_CMD:
     131    case POLY_CMD:
     132    {
     133      poly p=(poly)IDDATA(h);
     134      IDDATA(h)=(char*)pMinPolyNormalize(p);
     135      break;
     136    }
     137    case IDEAL_CMD:
     138    case MODUL_CMD:
     139    case MAP_CMD:
     140    case MATRIX_CMD:
     141    {
     142      int i;
     143      ideal I=(ideal)IDDATA(h);
     144      for(i=IDELEMS(I)-1;i>=0;i--) I->m[i]=pMinPolyNormalize(I->m[i]);
     145      break;
     146    }
     147    case LIST_CMD:
     148    {
     149      lists L=(lists)IDDATA(h);
     150      int i=L->nr;
     151      for(;i>=0;i--)
     152      {
     153        jjMINPOLY_red((idhdl)&(L->m[i]));
     154      }
     155    }
     156    default:
     157    //case RESOLUTION_CMD:
     158       Werror("type %d too complex...set minpoly before",IDTYP(h)); break;
     159  }
     160}
    117161static BOOLEAN jjMINPOLY(leftv res, leftv a)
    118162{
     
    139183    currRing->minpoly=p;
    140184    naMinimalPoly=((lnumber)currRing->minpoly)->z;
     185    // and now, normalize all already defined objects in this ring
     186    idhdl h=currRing->idroot;
     187    while(h!=NULL)
     188    {
     189      jjMINPOLY_red(h);
     190      h=IDNEXT(h);
     191    }
    141192  }
    142193  return FALSE;
Note: See TracChangeset for help on using the changeset viewer.