Changeset dabe365 in git for kernel/shiftgb.cc


Ignore:
Timestamp:
Aug 7, 2008, 8:08:37 PM (15 years ago)
Author:
Viktor Levandovskyy <levandov@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
5d97859f88aa52d68bbca5a456cd859d9492231a
Parents:
35ee9b7a58e79afeef7aebc85bd49c899533d499
Message:
*levandov: shiftbba prepared for release


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

Legend:

Unmodified
Added
Removed
  • kernel/shiftgb.cc

    r35ee9b7 rdabe365  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: shiftgb.cc,v 1.9 2008-07-26 14:28:03 motsak Exp $ */
     4/* $Id: shiftgb.cc,v 1.10 2008-08-07 18:08:37 levandov Exp $ */
    55/*
    66* ABSTRACT: kernel: utils for shift GB and free GB
     
    380380{
    381381  /* investigate only the leading monomial of p in currRing */
     382  if ( pIsConstant(p) ) return(1);
    382383  if (lV <= 0) return(0);
    383384  /* returns 1 iff p is in V */
     
    428429}
    429430
     431int poly_isInV(poly p, int lV)
     432{
     433  /* tests whether the whole polynomial p in in V */
     434  poly q = p;
     435  while (q!=NULL)
     436  {
     437    if ( !isInV(q,lV) )
     438    {
     439      return(0);
     440    }
     441    q = pNext(q);
     442  }
     443  return(1);
     444}
     445
     446int ideal_isInV(ideal I, int lV)
     447{
     448  /* tests whether each polynomial of an ideal I lies in in V */
     449  int i;
     450  int s    = IDELEMS(I)-1;
     451  for(i = 0; i <= s; i++)
     452  {
     453    if ( !poly_isInV(I->m[i],lV) )
     454    {
     455      return(0);
     456    }
     457  }
     458  return(1);
     459}
     460
     461
    430462int itoInsert(poly p, int uptodeg, int lV, const ring r)
    431463{
Note: See TracChangeset for help on using the changeset viewer.