Changeset e9c3b2 in git


Ignore:
Timestamp:
Mar 15, 2011, 7:17:47 PM (12 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
92e0ebb492f002a11e78b302b3758d32aedea17e
Parents:
1ed3466deda30d9e243b441fb4bc4e0c4729cf69
Message:
ADD: intvec: new view() method
ADD: some debug for NF strategy object
ADD: idSize

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@13978 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • kernel/ideals.cc

    r1ed346 re9c3b2  
    7171}
    7272
    73 #ifndef NDEBUG
     73#ifdef PDEBUG
    7474// this is only for outputting an ideal within the debugger
    7575void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint)
  • kernel/ideals.h

    r1ed346 re9c3b2  
    5454#endif
    5555ideal idCopyFirstK (const ideal ide, const int k);
    56 /*- deletes an ideal -*/
     56
     57/// delete an ideal
    5758#define idDelete(h) id_Delete(h, currRing)
    5859void id_Delete (ideal* h, ring r);
    5960void id_ShallowDelete (ideal* h, ring r);
    60   /*- initialise an ideal -*/
     61/*- initialise an ideal -*/ // ?
     62
     63/// initialise the maximal ideal (at 0)
    6164ideal idMaxIdeal (int deg);
    62   /*- initialise the maximal ideal (at 0) -*/
     65
     66/// gives an ideal the minimal possible size
    6367void idSkipZeroes (ideal ide);
    64 /* index of generator with leading term in ground ring (if any);
    65    otherwise -1 */
     68
     69/// index of generator with leading term in ground ring (if any); otherwise -1
    6670int idPosConstant (ideal id);
    67   /*gives an ideal the minimal possible size*/
     71
     72/// Count the effective size of an ideal
     73/// (without the trailing allocated zero-elements)
     74static inline int idSize(const ideal id)
     75{
     76  int j = IDELEMS(id) - 1;
     77  poly* mm = id->m;
     78  while ((j >= 0) && (mm[j] == NULL)) j--;
     79  return (j + 1);
     80};
     81
    6882void idNorm(ideal id);
    6983void idDelMultiples(ideal id);
     
    207221ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing = currRing); // image of certain map for BGG
    208222
    209 #ifndef NDEBUG
     223#ifdef PDEBUG
    210224/* Shows an ideal -- only for debugging */
    211225void idShow(const ideal id, const ring lmRing = currRing, const ring tailRing = currRing, const int debugPrint = 0);
    212 #endif
    213 #endif
     226#else
     227#define idShow(id, lmRing, tailRing, debugPrint) ((void)0)
     228#endif
     229#endif
  • kernel/intvec.cc

    r1ed346 re9c3b2  
    125125{
    126126  return omStrDup(ivString(1, 0, dim));
     127}
     128
     129void intvec::view () const
     130{
     131  Print ("intvec: {rows: %d, cols: %d, length: %d, Values: \n", rows(), cols(), length());
     132
     133  for (int i = 0; i < rows(); i++)
     134  {
     135    Print ("Row[%3d]:", i);
     136    for (int j = 0; j < cols(); j++)
     137      Print (" %5d", this->operator[]((i)*cols()+j) );
     138    PrintLn ();
     139  }
     140  PrintS ("}\n");
    127141}
    128142
  • kernel/intvec.h

    r1ed346 re9c3b2  
    8686  inline void length(int l) { row = l; col = 1; }
    8787  void show(int mat=0,int spaces=0) const;
     88  void view() const;
     89
    8890  inline void makeVector() { row*=col;col=1; }
    8991  char * String(int dim = 2) const;
  • kernel/kstd1.cc

    r1ed346 re9c3b2  
    15021502  p = pCopy(q);
    15031503  deleteHC(&p,&o,&j,strat);
     1504  kTest(strat);
    15041505  if (TEST_OPT_PROT) { PrintS("r"); mflush(); }
     1506  if (BVERBOSE(23)) kDebugPrint(strat);
    15051507  if (p!=NULL) p = redMoraNF(p,strat, lazyReduce & KSTD_NF_ECART);
    15061508  if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0))
  • kernel/kstd2.cc

    r1ed346 re9c3b2  
    12931293  kTest(strat);
    12941294  if (TEST_OPT_PROT) { PrintS("r"); mflush(); }
     1295  if (BVERBOSE(23)) kDebugPrint(strat);
    12951296  int max_ind;
    12961297  p = redNF(pCopy(q),max_ind,lazyReduce & KSTD_NF_NONORM,strat);
Note: See TracChangeset for help on using the changeset viewer.