Changeset 107986 in git for kernel/polys.cc


Ignore:
Timestamp:
Jul 25, 2008, 4:37:55 PM (15 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
356960f1a09d63bc25ab2b04269bb1f6ce67fd28
Parents:
7a6c062bb1546ba06ab19b759243b02e83b52197
Message:
*hannes: part stuff ,const ring


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

Legend:

Unmodified
Added
Removed
  • kernel/polys.cc

    r7a6c06 r107986  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: polys.cc,v 1.33 2008-07-15 15:29:15 wienand Exp $ */
     4/* $Id: polys.cc,v 1.34 2008-07-25 14:37:55 Singular Exp $ */
    55
    66/*
     
    209209* convert monomial given as string to poly, e.g. 1x3y5z
    210210*/
    211 const char * p_Read(const char *st, poly &rc, ring r)
     211const char * p_Read(const char *st, poly &rc, const ring r)
    212212{
    213213  if (r==NULL) { rc=NULL;return st;}
     
    782782*normalize all coefficients
    783783*/
    784 void p_Normalize(poly p, ring r)
     784void p_Normalize(poly p,const ring r)
    785785{
    786786  if (rField_has_simple_inverse(r)) return; /* Z/p, GF(p,n), R, long R/C */
     
    10411041  return FALSE;
    10421042}
     1043BOOLEAN pCompareChainPart (poly p,poly p1,poly p2,poly lcm)
     1044{
     1045  int k, j;
     1046
     1047  if (lcm==NULL) return FALSE;
     1048
     1049  for (j=currRing->real_var_end; j>=currRing->real_var_start; j--)
     1050    if ( pGetExp(p,j) >  pGetExp(lcm,j)) return FALSE;
     1051  if ( pGetComp(p) !=  pGetComp(lcm)) return FALSE;
     1052  for (j=currRing->real_var_end; j>=currRing->real_var_start; j--)
     1053  {
     1054    if (pGetExp(p1,j)!=pGetExp(lcm,j))
     1055    {
     1056      if (pGetExp(p,j)!=pGetExp(lcm,j))
     1057      {
     1058        for (k=pVariables; k>j; k--)
     1059        for (k=currRing->real_var_end; k>j; k--)
     1060        {
     1061          if ((pGetExp(p,k)!=pGetExp(lcm,k))
     1062          && (pGetExp(p2,k)!=pGetExp(lcm,k)))
     1063            return TRUE;
     1064        }
     1065        for (k=j-1; k>=currRing->real_var_start; k--)
     1066        {
     1067          if ((pGetExp(p,k)!=pGetExp(lcm,k))
     1068          && (pGetExp(p2,k)!=pGetExp(lcm,k)))
     1069            return TRUE;
     1070        }
     1071        return FALSE;
     1072      }
     1073    }
     1074    else if (pGetExp(p2,j)!=pGetExp(lcm,j))
     1075    {
     1076      if (pGetExp(p,j)!=pGetExp(lcm,j))
     1077      {
     1078        for (k=currRing->real_var_end; k>j; k--)
     1079        {
     1080          if ((pGetExp(p,k)!=pGetExp(lcm,k))
     1081          && (pGetExp(p1,k)!=pGetExp(lcm,k)))
     1082            return TRUE;
     1083        }
     1084        for (k=j-1; k>=currRing->real_var_start; k--)
     1085        {
     1086          if ((pGetExp(p,k)!=pGetExp(lcm,k))
     1087          && (pGetExp(p1,k)!=pGetExp(lcm,k)))
     1088            return TRUE;
     1089        }
     1090        return FALSE;
     1091      }
     1092    }
     1093  }
     1094  return FALSE;
     1095}
    10431096
    10441097int pSize(poly p)
Note: See TracChangeset for help on using the changeset viewer.