Changeset 094f80 in git


Ignore:
Timestamp:
Mar 10, 2009, 4:47:18 PM (15 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c7af8613769b29c741d6c338945669719f1fc4f8')
Children:
eda41404503d654cd3e9dacc624c5bd1e77fdafb
Parents:
ec993c0195f4b63f7c55517888001aa19a6794ba
Message:
*levandov: fixes for RatGring for modules, now std,syz and nres work well


git-svn-id: file:///usr/local/Singular/svn/trunk@11537 2c84dea3-7e68-4137-9b89-c4e89433aadc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Singular/extra.cc

    rec993c0 r094f80  
    22*  Computer Algebra System SINGULAR      *
    33*****************************************/
    4 /* $Id: extra.cc,v 1.296 2009-02-21 19:30:56 levandov Exp $ */
     4/* $Id: extra.cc,v 1.297 2009-03-10 15:47:18 levandov Exp $ */
    55/*
    66* ABSTRACT: general interface to internals of Singular ("system" command)
     
    26762676    {
    26772677      poly p,q;
    2678       int is;
    2679       if ((h!=NULL) && (h->Typ()==POLY_CMD))
     2678      int is, htype;
     2679      if ((h!=NULL) && ( (h->Typ()==POLY_CMD) || (h->Typ()==VECTOR_CMD) ) )
    26802680      {
    26812681        p=(poly)h->CopyD();
    26822682        h=h->next;
     2683        htype = h->Typ();
    26832684      }
    26842685      else return TRUE;
    2685       if ((h!=NULL) && (h->Typ()==POLY_CMD))
     2686      if ((h!=NULL) && ( (h->Typ()==POLY_CMD) || (h->Typ()==VECTOR_CMD) ) )
    26862687      {
    26872688        q=(poly)h->CopyD();
     
    26922693      {
    26932694        is=(int)((long)(h->Data()));
    2694         res->rtyp=POLY_CMD;
     2695        res->rtyp=htype;
    26952696        //      res->rtyp=IDEAL_CMD;
    26962697        if (rIsPluralRing(currRing))
  • kernel/gr_kstd2.cc

    rec993c0 r094f80  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: gr_kstd2.cc,v 1.36 2009-02-27 19:30:47 levandov Exp $ */
     4/* $Id: gr_kstd2.cc,v 1.37 2009-03-10 15:47:17 levandov Exp $ */
    55/*
    66*  ABSTRACT -  Kernel: noncomm. alg. of Buchberger
     
    306306      if(TEST_OPT_DEBUG)
    307307      {
    308         p_wrp(h->p,currRing); Print(" divisibly by S[%d]=",j);
     308        p_wrp(h->p,currRing); Print(" divisible by S[%d]=",j);
    309309        p_wrp(strat->S[j],currRing); PrintS(" e=-1\n");
    310310      }
  • kernel/ratgring.cc

    rec993c0 r094f80  
    77 *  Author:  levandov (Viktor Levandovsky)
    88 *  Created: 8/00 - 11/00
    9  *  Version: $Id: ratgring.cc,v 1.23 2009-02-27 19:30:47 levandov Exp $
     9 *  Version: $Id: ratgring.cc,v 1.24 2009-03-10 15:47:18 levandov Exp $
    1010 *******************************************************************/
    1111#include "mod2.h"
     
    9292  if (q == NULL) return p;
    9393  poly res = p_Head(p,r);
    94   while ( (q!=NULL) && (p_Comp_k_n(p, q, ishift+1, r)))
     94  const long cmp = p_GetComp(p, r);
     95  while ( (q!=NULL) && (p_Comp_k_n(p, q, ishift+1, r)) && (p_GetComp(q, r) == cmp) )
    9596  {
    9697    res = p_Add_q(res,p_Head(q,r),r);
    9798    q   = pNext(q);
    9899  }
     100  p_SetCompP(res,cmp,r);
    99101  return res;
    100102}
    101103
    102104/* returns x-coeff of p, i.e. a poly in x, s.t. corresponding xd-monomials
    103 have the same D-part
     105have the same D-part and the component 0
    104106does not destroy p
    105107*/
     
    112114  p_SetCoeff(res,n_Copy(p_GetCoeff(p,r),r),r);
    113115  poly s;
    114   while ((q!= NULL) && (p_Comp_k_n(p, q, ishift+1, r)))
     116  long cmp = p_GetComp(p, r);
     117  while ( (q!= NULL) && (p_Comp_k_n(p, q, ishift+1, r)) && (p_GetComp(q, r) == cmp) )
    115118  {
    116119    s   = p_GetExp_k_n(q, ishift+1, r->N, r);
     
    119122    q   = pNext(q);
    120123  }
     124  cmp = 0;
     125  p_SetCompP(res,cmp,r);
    121126  return res;
    122127}
     
    128133  p_LmCheckPolyRing2(*p, r);
    129134  poly q = p_Head(*p,r);
    130   while ( ( (*p)!=NULL ) && ( p_Comp_k_n(*p, q, ishift+1, r) ))
     135  const long cmp = p_GetComp(*p, r);
     136  while ( ( (*p)!=NULL ) && ( p_Comp_k_n(*p, q, ishift+1, r) ) && (p_GetComp(*p, r) == cmp) )
    131137  {
    132138    p_LmDelete(p,r);
Note: See TracChangeset for help on using the changeset viewer.