[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:53:55 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 8aa829ee64eb94fc6fc9ec9a4277e655ca91bf1e
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date:   Wed Feb 29 17:28:25 2012 +0100

    add: new order am: weights on vars and gens

diff --git a/Singular/ipshell.cc b/Singular/ipshell.cc
index f1c3554..b943e27 100644
--- a/Singular/ipshell.cc
+++ b/Singular/ipshell.cc
@@ -1848,12 +1848,20 @@ lists rDecompose(const ring r)
     } else
     if (r->block1[i]-r->block0[i] >=0 )
     {
-      j=r->block1[i]-r->block0[i];
-      if (r->order[i]==ringorder_M)  j=(j+1)*(j+1)-1;
+      int bl=j=r->block1[i]-r->block0[i];
+      if (r->order[i]==ringorder_M)
+      {
+        j=(j+1)*(j+1)-1;
+	bl=j+1;
+      }
+      else if (r->order[i]==ringorder_am)
+      {
+        j=omSizeWOfAddr(r->wvhdl[i])-3;
+      }
       iv=new intvec(j+1);
       if ((r->wvhdl!=NULL) && (r->wvhdl[i]!=NULL))
       {
-        for(;j>=0; j--) (*iv)[j]=r->wvhdl[i][j];
+        for(;j>=0; j--) (*iv)[j]=r->wvhdl[i][j+(j>bl)];
       }
       else switch (r->order[i])
       {
@@ -4547,7 +4555,8 @@ BOOLEAN rSleftvOrdering2Ordering(sleftv *ord, ring R)
       n--;
     }
     else if (((*iv)[1]!=ringorder_a)
-    && ((*iv)[1]!=ringorder_a64))
+    && ((*iv)[1]!=ringorder_a64)
+    && ((*iv)[1]!=ringorder_am))
       o++;
     n++;
     sl=sl->next;
@@ -4691,6 +4700,27 @@ BOOLEAN rSleftvOrdering2Ordering(sleftv *ord, ring R)
             last=R->block0[n]-1;
             break;
           }
+          case ringorder_am:
+          {
+            R->block0[n] = last+1;
+            R->block1[n] = si_min(last+iv->length()-2 , rVar(R));
+            R->wvhdl[n] = (int*)omAlloc(iv->length()*sizeof(int));
+	    if (R->block1[n]- R->block0[n]+2>=iv->length())
+	      WarnS("missing module weights");
+            for (i=2; i<=(R->block1[n]-R->block0[n]+2); i++)
+            {
+              R->wvhdl[n][i-2]=(*iv)[i];
+              last++;
+              if (weights[last]==0) weights[last]=(*iv)[i]*typ;
+            }
+            R->wvhdl[n][i-2]=iv->length() -3 -(R->block1[n]- R->block0[n]);
+            for (; i<iv->length(); i++)
+            {
+              R->wvhdl[n][i-1]=(*iv)[i];
+            }
+            last=R->block0[n]-1;
+            break;
+          }
           case ringorder_a64:
           {
             R->block0[n] = last+1;
diff --git a/Singular/ssiLink.cc b/Singular/ssiLink.cc
index 2a0ce15..3d464d7 100644
--- a/Singular/ssiLink.cc
+++ b/Singular/ssiLink.cc
@@ -4,7 +4,6 @@
 /***************************************************************
  * File:    ssiLink.h
  *  Purpose: declaration of sl_link routines for ssi
- *  Version: $Id$
  ***************************************************************/
 #include <stdio.h>
 #include <fcntl.h>
diff --git a/kernel/p_polys.cc b/kernel/p_polys.cc
index 6349d5b..01c15c6 100644
--- a/kernel/p_polys.cc
+++ b/kernel/p_polys.cc
@@ -6,7 +6,6 @@
  *  Purpose: implementation of currRing independent poly procedures
  *  Author:  obachman (Olaf Bachmann)
  *  Created: 8/00
- *  Version: $Id$
  *******************************************************************/
 
 
@@ -87,6 +86,36 @@ void p_Setm_General(poly p, const ring r)
           p->exp[o->data.wp.place]=ord;
           break;
         }
+        case ro_am:
+        {
+          ord=POLY_NEGWEIGHT_OFFSET;
+          int a,e;
+          a=o->data.am.start;
+          e=o->data.am.end;
+          int *w=o->data.am.weights;
+#if 1
+          for(int i=a;i<=e;i++) ord+=p_GetExp(p,i,r)*w[i-a];
+          int c=p_GetComp(p,r);
+#else
+          long ai;
+          int ei,wi;
+          for(int i=a;i<=e;i++)
+          {
+             ei=p_GetExp(p,i,r);
+             wi=w[i-a];
+             ai=ei*wi;
+             if (ai/ei!=wi) pSetm_error=TRUE;
+             ord+=ai;
+             if (ord<ai) pSetm_error=TRUE;
+          }
+#endif
+          if ((c>0)&&(c<=o->data.am.len_gen))
+          {
+            ord+=w[c-(e-a)+2];
+          }
+          p->exp[o->data.am.place]=ord;
+          break;
+        }
       case ro_wp64:
         {
           int64 ord=0;
@@ -171,7 +200,7 @@ void p_Setm_General(poly p, const ring r)
           const unsigned long c = p_GetComp(p, r);
           const short place = o->data.syz.place;
           const int limit = o->data.syz.limit;
-          
+
           if (c > limit)
             p->exp[place] = o->data.syz.curr_index;
           else if (c > 0)
@@ -218,7 +247,7 @@ void p_Setm_General(poly p, const ring r)
               assume( p_GetExp(p, r, vo) == p_GetExp(p, i, r) ); // copy put them verbatim
             }
           }
-	   
+
 #ifndef NDEBUG
           for( int i = 1; i <= r->N; i++ ) // No v[0] here!!!
           {
@@ -230,7 +259,7 @@ void p_Setm_General(poly p, const ring r)
             }
           }
 #endif
-	   
+
 #ifndef NDEBUG
 #if MYTEST
           PrintS("Initial Value: "); p_DebugPrint(p, r, r, 1);
@@ -275,7 +304,7 @@ void p_Setm_General(poly p, const ring r)
 
 #ifndef NDEBUG
 #if MYTEST
-            Print("Respective F[c - %d: %d] pp: ", limit, c); 
+            Print("Respective F[c - %d: %d] pp: ", limit, c);
             p_DebugPrint(pp, r, r, 1);
 #endif
 #endif
@@ -288,29 +317,29 @@ void p_Setm_General(poly p, const ring r)
             const int end = o->data.is.end;
 
             assume(start <= end);
-	     
+
 //          const int limit = o->data.is.limit;
           assume( limit >= 0 );
 
-//	  const int st = o->data.isTemp.start;	     
+//          const int st = o->data.isTemp.start;
 
           if( c > limit )
             p->exp[start] = 1;
 //          else
 //            p->exp[start] = 0;
 
-	     
+
 #ifndef NDEBUG
-	    Print("p_Setm_General: is(-Temp-) :: c: %d, limit: %d, [st:%d] ===>>> %ld\n", c, limit, start, p->exp[start]);
-#endif	     
-   
+            Print("p_Setm_General: is(-Temp-) :: c: %d, limit: %d, [st:%d] ===>>> %ld\n", c, limit, start, p->exp[start]);
+#endif
+
 
             for( int i = start; i <= end; i++) // v[0] may be here...
               p->exp[i] += pp->exp[i]; // !!!!!!!! ADD corresponding LT(F)
 
-       
 
-	     
+
+
 #ifndef NDEBUG
             const int* const pVarOffset = o->data.is.pVarOffset;
 
@@ -345,13 +374,11 @@ void p_Setm_General(poly p, const ring r)
 
 #ifndef NDEBUG
 #if MYTEST
-	    Print("p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit, vo, p->exp[vo]);
+            Print("p_Setm_General: ro_is :: c: %d <= limit: %d, vo: %d, exp: %d\n", c, limit, vo, p->exp[vo]);
             p_DebugPrint(p, r, r, 1);
-#endif	     
-#endif	     
+#endif
+#endif
           }
-	   
-
           break;
         }
         default:
diff --git a/kernel/ring.cc b/kernel/ring.cc
index cfde4fc..5f4ad30 100644
--- a/kernel/ring.cc
+++ b/kernel/ring.cc
@@ -1,8 +1,6 @@
 /****************************************
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: ring.cc 14541 2012-01-26 19:00:07Z motsak $ */
-
 /*
 * ABSTRACT - the interpreter related ring operations
 */
@@ -60,6 +58,7 @@ static const char * const ringorder_name[] =
   "Ds", ///< ringorder_Ds,
   "ws", ///< ringorder_ws,
   "Ws", ///< ringorder_Ws,
+  "am",  ///< ringorder_am,
   "L", ///< ringorder_L,
   "aa", ///< ringorder_aa
   "rs", ///< ringorder_rs,
@@ -364,6 +363,7 @@ void rWrite(ring r)
     (  (r->order[l] >= ringorder_lp)
     ||(r->order[l] == ringorder_M)
     ||(r->order[l] == ringorder_a)
+    ||(r->order[l] == ringorder_am)
     ||(r->order[l] == ringorder_a64)
     ||(r->order[l] == ringorder_aa) ) && (r->order[l] < ringorder_IS) )
     {
@@ -398,6 +398,13 @@ void rWrite(ring r)
         }
         if (r->order[l]!=ringorder_M) break;
       }
+      if (r->order[l]==ringorder_am) /*j==0*/
+      {
+        int m=r->wvhdl[l][i];
+        Print("\n//                  : %d module weights ",m);
+        m+=i;i++;
+        for(;i<=m;i++) Print(" %*d" ,nlen,r->wvhdl[l][i]);
+      }
     }
   }
 #ifdef HAVE_PLURAL
@@ -1941,7 +1948,7 @@ BOOLEAN rHasSimpleOrder(const ring r)
   assume(blocks >= 1);
   if (blocks == 1) return TRUE;
 
-  int s = 0; 
+  int s = 0;
   while( (s < blocks) && (r->order[s] == ringorder_IS) && (r->order[blocks-1] == ringorder_IS) )
   {
     s++;
@@ -1951,7 +1958,7 @@ BOOLEAN rHasSimpleOrder(const ring r)
   if ((blocks - s) > 2)  return FALSE;
 
   assume( blocks == s + 2 );
-  
+
   if (
      (r->order[s] != ringorder_c)
   && (r->order[s] != ringorder_C)
@@ -2016,7 +2023,7 @@ BOOLEAN rHasSimpleOrderAA(ring r)
   assume(blocks >= 1);
   if (blocks == 1) return TRUE;
 
-  int s = 0; 
+  int s = 0;
   while( (s < blocks) && (r->order[s] == ringorder_IS) && (r->order[blocks-1] == ringorder_IS) )
   {
     s++;
@@ -2024,7 +2031,7 @@ BOOLEAN rHasSimpleOrderAA(ring r)
   }
 
   if ((blocks - s) > 3)  return FALSE;
-  
+
 //  if ((blocks > 3) || (blocks < 2)) return FALSE;
   if ((blocks - s) == 3)
   {
@@ -2327,6 +2334,24 @@ static void rO_WDegree(int &place, int &bitplace, int start, int end,
   }
 }
 
+static void rO_WMDegree(int &place, int &bitplace, int start, int end,
+    long *o, sro_ord &ord_struct, int *weights)
+{
+  // weighted degree (aligned) of variables v_start..v_end, ordsgn 1
+  while((start<end) && (weights[0]==0)) { start++; weights++; }
+  while((start<end) && (weights[end-start]==0)) { end--; }
+  rO_Align(place,bitplace);
+  ord_struct.ord_typ=ro_am;
+  ord_struct.data.am.start=start;
+  ord_struct.data.am.end=end;
+  ord_struct.data.am.place=place;
+  ord_struct.data.am.len_gen=weights[end-start+1];
+  ord_struct.data.am.weights=weights;
+  o[place]=1;
+  place++;
+  rO_Align(place,bitplace);
+}
+
 static void rO_WDegree64(int &place, int &bitplace, int start, int end,
     long *o, sro_ord &ord_struct, int64 *weights)
 {
@@ -3196,6 +3221,7 @@ static void rHighSet(ring r, int o_r, int o)
     case ringorder_rp:
     case ringorder_a:
     case ringorder_aa:
+    case ringorder_am:
     case ringorder_a64:
       if (r->OrdSgn==-1) r->MixedOrder=TRUE;
       break;
@@ -3297,7 +3323,7 @@ static void rOptimizeLDeg(ring r)
     if (r->pLDeg == pLDeg1c)
       r->pLDeg = pLDeg1c_WFirstTotalDegree;
   }
-  r->pLDegOrig = r->pLDeg;
+  r->pLDegOrig=r->pLDeg;
 }
 
 // set pFDeg, pLDeg, MixOrder, ComponentOrder, etc
@@ -3321,11 +3347,34 @@ static void rSetDegStuff(ring r)
   r->pFDeg = p_Totaldegree;
   r->pLDeg = (r->OrdSgn == 1 ? pLDegb : pLDeg0);
 
+  /*======== ordering type is (am,_) ==================*/
+  if ((order[0]==ringorder_am)
+  )
+  {
+    r->MixedOrder = FALSE;
+    for(int ii=block0[0];ii<=block1[0];ii++)
+      if (wvhdl[0][ii-1]<0) { r->MixedOrder=TRUE;break;}
+    r->LexOrder=FALSE;
+    for(int ii=block0[0];ii<=block1[0];ii++)
+      if (wvhdl[0][ii-1]==0) { r->LexOrder=TRUE;break;}
+    if ((block0[0]==1)&&(block1[0]==r->N))
+    {
+      r->pFDeg==pDeg;
+      r->pLDeg = pLDeg1c_Deg;
+    }
+    else
+    {
+      r->pFDeg = pWTotaldegree;
+      r->LexOrder=TRUE;
+      r->pLDeg = pLDeg1c_WFirstTotalDegree;
+    }
+    r->firstwv = wvhdl[0];
+  }
   /*======== ordering type is (_,c) =========================*/
-  if ((order[0]==ringorder_unspec) || (order[1] == 0)
+  else if ((order[0]==ringorder_unspec) || (order[1] == 0)
       ||(
     ((order[1]==ringorder_c)||(order[1]==ringorder_C)
-     ||(order[1]==ringorder_S) 
+     ||(order[1]==ringorder_S)
      ||(order[1]==ringorder_s))
     && (order[0]!=ringorder_M)
     && (order[2]==0))
@@ -3416,7 +3465,7 @@ static void rSetDegStuff(ring r)
     }
     r->pFDeg = pWTotaldegree; // may be improved: p_Totaldegree for lp/dp/ls/.. blocks
   }
-  
+
   if (rOrd_is_Totaldegree_Ordering(r) || rOrd_is_WeightedDegree_Ordering(r))
     r->pFDeg = pDeg;
 
@@ -3527,6 +3576,12 @@ BOOLEAN rComplete(ring r, int force)
         typ_i++;
         break;
 
+      case ringorder_am:
+        rO_WMDegree(j,j_bits,r->block0[i],r->block1[i],tmp_ordsgn,tmp_typ[typ_i],
+                   r->wvhdl[i]);
+        typ_i++;
+        break;
+
       case ringorder_a64:
         rO_WDegree64(j,j_bits,r->block0[i],r->block1[i],tmp_ordsgn,
                      tmp_typ[typ_i], (int64 *)(r->wvhdl[i]));
@@ -3661,7 +3716,7 @@ BOOLEAN rComplete(ring r, int force)
              rO_TDegree(j,j_bits,r->block0[i],r->block1[i],tmp_ordsgn,
                                      tmp_typ[typ_i]);
              typ_i++;
-	     rCheckOrdSgn(r,i);
+             rCheckOrdSgn(r,i);
           }
         }
         if (r->block1[i]!=r->block0[i])
@@ -3687,7 +3742,7 @@ BOOLEAN rComplete(ring r, int force)
              rO_TDegree(j,j_bits,r->block0[i],r->block1[i],tmp_ordsgn,
                                      tmp_typ[typ_i]);
              typ_i++;
-	     rCheckOrdSgn(r,i);
+             rCheckOrdSgn(r,i);
           }
         }
         if (r->block1[i]!=r->block0[i])
@@ -3706,7 +3761,7 @@ BOOLEAN rComplete(ring r, int force)
           rO_LexVars_neg(j, j_bits,r->block1[i],r->block0[i]+1, prev_ordsgn,
                          tmp_ordsgn, v,bits, r->block0[i]);
         }
-	rCheckOrdSgn(r,i);
+        rCheckOrdSgn(r,i);
         break;
 
       case ringorder_Ws:
@@ -3718,7 +3773,7 @@ BOOLEAN rComplete(ring r, int force)
           rO_LexVars(j, j_bits,r->block0[i],r->block1[i]-1, prev_ordsgn,
                      tmp_ordsgn,v, bits, r->block1[i]);
         }
-	rCheckOrdSgn(r,i);
+        rCheckOrdSgn(r,i);
         break;
 
       case ringorder_S:
@@ -4073,7 +4128,7 @@ void rDebugPrint(ring r)
     return;
   }
   // corresponds to ro_typ from ring.h:
-  const char *TYP[]={"ro_dp","ro_wp","ro_wp64","ro_wp_neg","ro_cp",
+  const char *TYP[]={"ro_dp","ro_wp","ro_am", "ro_wp64","ro_wp_neg","ro_cp",
                      "ro_syzcomp", "ro_syz", "ro_isTemp", "ro_is", "ro_none"};
   int i,j;
 
@@ -4149,6 +4204,22 @@ void rDebugPrint(ring r)
         (r->typ[j].data.is.componentWeights)->show(); PrintLn();
       }
     }
+    else if  (r->typ[j].ord_typ==ro_am)
+    {
+      Print("  place %d",r->typ[j].data.am.place);
+      Print("  start %d",r->typ[j].data.am.start);
+      Print("  end %d",r->typ[j].data.am.end);
+      Print("  len_gen %d",r->typ[j].data.am.len_gen);
+      PrintS(" w:");
+      int l=0;
+      for(l=r->typ[j].data.am.start;l<=r->typ[j].data.am.end;l++)
+            Print(" %d",r->typ[j].data.am.weights[l-r->typ[j].data.am.start]);
+      l=r->typ[j].data.am.end+1;
+      int ll=r->typ[j].data.am.weights[l-r->typ[j].data.am.start];
+      PrintS(" m:");
+      for(int lll=l+1;lll<l+ll+1;lll++)
+            Print(" %d",r->typ[j].data.am.weights[lll-r->typ[j].data.am.start]);
+    }
     else
     {
       Print("  place %d",r->typ[j].data.dp.place);
@@ -4226,18 +4297,28 @@ void rDebugPrint(ring r)
 
   {
 #define pFDeg_CASE(A) if(r->pFDeg == A) PrintS( "" #A "" )
-    Print("\npFDeg   : ");
-    
+    Print("pFDeg   : ");
+
     pFDeg_CASE(p_Totaldegree); else
       pFDeg_CASE(pWFirstTotalDegree); else
       pFDeg_CASE(pWTotaldegree); else
       pFDeg_CASE(pDeg); else
       Print("(%p)", r->pFDeg); // default case
-    
-    PrintS("\n");
+
+    PrintLn();
 #undef pFDeg_CASE
   }
-    
+  Print("pSetm:");
+  void p_Setm_Dummy(poly p, const ring r);
+  void p_Setm_TotalDegree(poly p, const ring r);
+  void p_Setm_WFirstTotalDegree(poly p, const ring r);
+  void p_Setm_General(poly p, const ring r);
+  if (r->p_Setm==p_Setm_General) PrintS("p_Setm_General\n");
+  else if (r->p_Setm==p_Setm_Dummy) PrintS("p_Setm_Dummy\n");
+  else if (r->p_Setm==p_Setm_TotalDegree) PrintS("p_Setm_Totaldegree\n");
+  else if (r->p_Setm==p_Setm_WFirstTotalDegree) PrintS("p_Setm_WFirstTotalDegree\n");
+  else Print("%x\n",r->p_Setm);
+
 }
 
 void p_DebugPrint(poly p, const ring r)
@@ -4370,7 +4451,7 @@ void rDBChangeSComps(int* currComponents,
                      ring r)
 {
   assume(r->typ[1].ord_typ == ro_syzcomp);
-      
+
   r->typ[1].data.syzcomp.length = length;
   rNChangeSComps( currComponents, currShiftedComponents, r);
 }
@@ -4380,7 +4461,7 @@ void rDBGetSComps(int** currComponents,
                  ring r)
 {
   assume(r->typ[1].ord_typ == ro_syzcomp);
-  
+
   *length = r->typ[1].data.syzcomp.length;
   rNGetSComps( currComponents, currShiftedComponents, r);
 }
diff --git a/kernel/ring.h b/kernel/ring.h
index cdd4b00..58f8e8b 100644
--- a/kernel/ring.h
+++ b/kernel/ring.h
@@ -6,7 +6,6 @@
 /*
 * ABSTRACT - the interpreter related ring operations
 */
-/* $Id$ */
 
 /* includes */
 #include <kernel/structs.h>
@@ -80,7 +79,7 @@ static inline bool rIsPluralRing(const ring r)
 {
 #ifdef HAVE_PLURAL
   nc_struct *n;
-  return (r != NULL) && ((n=r->GetNC()) != NULL) /*&& (n->type != nc_error)*/; 
+  return (r != NULL) && ((n=r->GetNC()) != NULL) /*&& (n->type != nc_error)*/;
 #else
   return false;
 #endif
@@ -91,7 +90,7 @@ static inline bool rIsRatGRing(const ring r)
 #ifdef HAVE_PLURAL
   /* nc_struct *n; */
   return (r != NULL) /* && ((n=r->GetNC()) != NULL) */
-	  && (r->real_var_start>1);
+          && (r->real_var_start>1);
 #else
   return false;
 #endif
@@ -346,10 +345,11 @@ typedef enum rRingOrder_t
   ringorder_Ds,
   ringorder_ws,
   ringorder_Ws,
+  ringorder_am,
   ringorder_L,
   // the following are only used internally
   ringorder_aa, ///< for idElimination, like a, except pFDeg, pWeigths ignore it
-  ringorder_rs, ///< ???
+  ringorder_rs, ///< opposite of ls
   ringorder_IS, ///< Induced (Schreyer) ordering
   ringorder_unspec
 } rRingOrder_t;
diff --git a/kernel/structs.h b/kernel/structs.h
index 731e3b5..51ba1fb 100644
--- a/kernel/structs.h
+++ b/kernel/structs.h
@@ -3,7 +3,6 @@
 /****************************************
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id$ */
 /*
 * ABSTRACT
 */
@@ -254,6 +253,7 @@ typedef enum
 {
   ro_dp, // ordering is a degree ordering
   ro_wp, // ordering is a weighted degree ordering
+  ro_am, // ordering is am: weights for vars + weights for gen
   ro_wp64, // ordering is a weighted64 degree ordering
   ro_wp_neg, // ordering is a weighted degree ordering
              // with possibly negative weights
@@ -285,6 +285,18 @@ struct sro_wp
 typedef struct sro_wp sro_wp;
 
 // ordering is a weighted degree ordering
+struct sro_am
+{
+  short place;  // where weighted degree is stored (in L)
+  short start;  // bounds of ordering (in E)
+  short end;
+  short len_gen; // i>len_gen: weight(gen(i)):=0
+  int *weights; // pointers into wvhdl field of length (end-start+1) + len_gen
+                // contents w_1,... w_n, len, mod_w_1, .. mod_w_len, 0
+};
+typedef struct sro_am sro_am;
+
+// ordering is a weighted degree ordering
 struct sro_wp64
 {
     short place;  // where weighted degree is stored (in L)
@@ -365,6 +377,7 @@ struct sro_ord
   {
      sro_dp dp;
      sro_wp wp;
+     sro_am am;
      sro_wp64 wp64;
      sro_cp cp;
      sro_syzcomp syzcomp;
@@ -412,7 +425,7 @@ struct nc_struct
   // initial data: square matrices rVar() x rVar()
   // logically: upper triangular!!!
   // TODO: eliminate this waste of memory!!!!
-  matrix C; 
+  matrix C;
   matrix D;
 
   // computed data:
@@ -420,7 +433,7 @@ struct nc_struct
   matrix COM;
   int *MTsize; // size 0.. (rVar()*rVar()-1)/2
 
-  // IsSkewConstant indicates whethere coeffs C_ij are all equal, 
+  // IsSkewConstant indicates whethere coeffs C_ij are all equal,
   // effective together with nc_type=nc_skew
   int IsSkewConstant;
 
@@ -437,8 +450,8 @@ struct nc_struct
         // 1 <= iAltVarsStart <= iAltVarsEnd <= r->N
         unsigned int iFirstAltVar, iLastAltVar; // = 0 by default
 
-        // for factors of super-commutative algebras we need 
-        // the part of general quotient ideal modulo squares!    
+        // for factors of super-commutative algebras we need
+        // the part of general quotient ideal modulo squares!
         ideal idSCAQuotient; // = NULL by default. // must be deleted in Kill!
       } sca;
     } data;
@@ -447,21 +460,21 @@ struct nc_struct
     CFormulaPowerMultiplier* m_PowerMultiplier;
 
   public:
-    
+
     inline nc_type& ncRingType() { return (type); };
     inline nc_type ncRingType() const { return (type); };
 
-    inline unsigned int& FirstAltVar() 
+    inline unsigned int& FirstAltVar()
         { assume(ncRingType() == nc_exterior); return (data.sca.iFirstAltVar); };
-    inline unsigned int& LastAltVar () 
+    inline unsigned int& LastAltVar ()
         { assume(ncRingType() == nc_exterior); return (data.sca.iLastAltVar ); };
 
-    inline unsigned int FirstAltVar() const 
+    inline unsigned int FirstAltVar() const
         { assume(ncRingType() == nc_exterior); return (data.sca.iFirstAltVar); };
-    inline unsigned int LastAltVar () const 
+    inline unsigned int LastAltVar () const
         { assume(ncRingType() == nc_exterior); return (data.sca.iLastAltVar ); };
 
-    inline ideal& SCAQuotient() 
+    inline ideal& SCAQuotient()
         { assume(ncRingType() == nc_exterior); return (data.sca.idSCAQuotient); };
 
     inline CGlobalMultiplier* GetGlobalMultiplier() const
@@ -476,7 +489,7 @@ struct nc_struct
 
     inline CFormulaPowerMultiplier*& GetFormulaPowerMultiplier()
         { return (m_PowerMultiplier); };
-    
+
   public:
     nc_pProcs p_Procs; // NC procedures.
 

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list