Changeset 599813 in git


Ignore:
Timestamp:
May 23, 2012, 5:42:26 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
70a95295f71d2f0c4c3433b152aef7a25b43e520
Parents:
a28cb4f3357225d7f8bb8d68a4aa0b0be3ccdd41
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-05-23 17:42:26+02:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-05-23 20:33:48+02:00
Message:
minor changes/improvements

add: default return value for a missing/wrong attribute of an idhdl object (atGet)
chg: minor cleanup in p_Setm_General
add: output of NegWeightL_* in rDebugPrint
add: some doxygen docs to pGetCoeff
add: more (internal) debug output on the ring/exponent structure: VarL_LowIndex, VarL_Offset
add: doxygen description to id_Sort
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Singular/attrib.cc

    ra28cb4f r599813  
    128128}
    129129
    130 void * atGet(idhdl root,const char * name, int t)
     130void * atGet(idhdl root,const char * name, int t, void *defaultReturnValue)
    131131{
    132132  attr temp = root->attribute->get(name);
     
    134134    return temp->data;
    135135  else
    136     return NULL;
     136    return defaultReturnValue;
    137137}
    138138
  • Singular/attrib.h

    ra28cb4f r599813  
    3434void * atGet(idhdl root,const char * name);
    3535void * atGet(leftv root,const char * name);
    36 void * atGet(idhdl root,const char * name, int t);
     36void * atGet(idhdl root,const char * name, int t, void *defaultReturnValue = NULL);
    3737void * atGet(leftv root,const char * name, int t);
    3838void atSet(idhdl root,const char * name,void * data,int typ);
  • libpolys/polys/monomials/p_polys.cc

    ra28cb4f r599813  
    148148          if ((c > 0) && (c <= len_gen))
    149149          {
    150             const int * const wm = o->data.am.weights_m;
    151             assume( wm[0] == len_gen );
    152             ord += wm[c];
     150            assume( w == o->data.am.weights_m );
     151            assume( w[0] == len_gen );
     152            ord += w[c];
    153153          }
    154154         
  • libpolys/polys/monomials/p_polys.h

    ra28cb4f r599813  
    4848// coeff
    4949// #define pGetCoeff(p)        ((p)->coef)
     50/// return an alias to the leading coefficient of p
     51/// assumes that p != NULL
     52/// NOTE: not copy
    5053static inline number& pGetCoeff(poly p)
    5154{
  • libpolys/polys/monomials/ring.cc

    ra28cb4f r599813  
    40334033  Print("VarL_Size:%d\n",r->VarL_Size);
    40344034  Print("bitmask=0x%lx (expbound=%ld) \n",r->bitmask, r->bitmask);
     4035  Print("divmask=%lx\n", r->divmask);
    40354036  Print("BitsPerExp=%d ExpPerLong=%d MinExpPerLong=%d at L[%d]\n", r->BitsPerExp, r->ExpPerLong, r->MinExpPerLong, r->VarL_Offset[0]);
    4036   PrintS("varoffset:\n");
     4037
     4038  Print("VarL_LowIndex: %d\n", r->VarL_LowIndex);
     4039  PrintS("VarL_Offset:\n");
     4040  if (r->VarL_Offset==NULL) PrintS(" NULL");
     4041  else
     4042    for(j = 0; j < r->VarL_Size; j++)
     4043      Print("  VarL_Offset[%d]: %d ", j, r->VarL_Offset[j]);
     4044  PrintLn();
     4045     
     4046
     4047  PrintS("VarOffset:\n");
    40374048  if (r->VarOffset==NULL) PrintS(" NULL\n");
    40384049  else
     
    40404051      Print("  v%d at e-pos %d, bit %d\n",
    40414052            j,r->VarOffset[j] & 0xffffff, r->VarOffset[j] >>24);
    4042   Print("divmask=%lx\n", r->divmask);
    40434053  PrintS("ordsgn:\n");
    40444054  for(j=0;j<r->CmpL_Size;j++)
     
    41644174  }
    41654175  Print("LexOrder:%d, MixedOrder:%d\n",r->LexOrder, r->MixedOrder);
     4176
     4177  Print("NegWeightL_Size: %d, NegWeightL_Offset: ", r->NegWeightL_Size);
     4178  if (r->NegWeightL_Offset==NULL) PrintS(" NULL");
     4179  else
     4180    for(j = 0; j < r->NegWeightL_Size; j++)
     4181      Print("  [%d]: %d ", j, r->NegWeightL_Offset[j]);
     4182  PrintLn();
    41664183
    41674184  // p_Procs stuff
  • libpolys/polys/simpleideals.cc

    ra28cb4f r599813  
    434434#endif
    435435
    436 /*3
    437 * for idSort: compare a and b revlex inclusive module comp.
    438 */
     436///3 for idSort: compare a and b revlex inclusive module comp.
    439437static int p_Comp_RevLex(poly a, poly b,BOOLEAN nolex, const ring R)
    440438{
     
    469467}
    470468
    471 /*2
    472 *sorts the ideal w.r.t. the actual ringordering
    473 *uses lex-ordering when nolex = FALSE
    474 */
    475 intvec *id_Sort(ideal id,BOOLEAN nolex, const ring r)
     469// sorts the ideal w.r.t. the actual ringordering
     470// uses lex-ordering when nolex = FALSE
     471intvec *id_Sort(const ideal id, const BOOLEAN nolex, const ring r)
    476472{
    477473  intvec * result = new intvec(IDELEMS(id));
  • libpolys/polys/simpleideals.h

    ra28cb4f r599813  
    101101void id_DelDiv(ideal id, const ring r);
    102102BOOLEAN id_IsConstant(ideal id, const ring r);
    103 intvec *id_Sort(ideal id,BOOLEAN nolex, const ring r);
     103
     104/// sorts the ideal w.r.t. the actual ringordering
     105/// uses lex-ordering when nolex = FALSE
     106intvec *id_Sort(const ideal id, const BOOLEAN nolex, const ring r);
     107
    104108ideal id_Transp(ideal a, const ring rRing);
    105109void id_Compactify(ideal id, const ring r);
Note: See TracChangeset for help on using the changeset viewer.