Changeset ded085 in git for kernel/ideals.cc


Ignore:
Timestamp:
Dec 11, 2009, 4:40:02 PM (13 years ago)
Author:
Frank Seelisch <seelisch@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
867e1a39616ddc1692d837af059565a1320e8cc7
Parents:
b54a393fcb8e823c662951c5a6219096fb8a6800
Message:
in ring.cc: completed rChar for Z/n, Z/p^m, and Z/2^m
in ideals.*: made insertion into ideals return TRUE/FALSE instead of void

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

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    rb54a393 rded085  
    541541
    542542/*2
    543 * concat h1 and h2
    544 */
    545 void idInsertPoly (ideal h1,poly h2)
    546 {
    547   if (h2==NULL) return;
     543* insert h2 into h1 (if h2 is not the zero polynomial)
     544* return TRUE iff h2 was indeed inserted
     545*/
     546BOOLEAN idInsertPoly (ideal h1, poly h2)
     547{
     548  if (h2==NULL) return FALSE;
    548549  int j = IDELEMS(h1)-1;
    549550  while ((j >= 0) && (h1->m[j] == NULL)) j--;
     
    555556  }
    556557  h1->m[j]=h2;
    557 }
    558 
    559 /*2
    560 * concat h1 and h2 (if h2 is neither zero nor a generator of h1)
    561 */
    562 void idInsertPolyNoDuplicates (ideal h1,poly h2)
     558  return TRUE;
     559}
     560
     561/*2
     562* insert h2 into h1 (if h2 is neither the zero polynomial
     563* nor a generator in h1)
     564* return TRUE iff h2 was indeed inserted
     565*/
     566BOOLEAN idInsertPolyNoDuplicates (ideal h1, poly h2)
    563567{
    564568  bool h2FoundInH1 = false;
     
    569573    i++;
    570574  }
    571   if (!h2FoundInH1) idInsertPoly(h1, h2);
     575  if (!h2FoundInH1) return idInsertPoly(h1, h2);
     576  else return FALSE;
    572577}
    573578
Note: See TracChangeset for help on using the changeset viewer.