Changeset 921f32 in git


Ignore:
Timestamp:
Dec 18, 2018, 4:55:28 PM (5 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
76b17c9f4370c2a5339d376eb75d3d06e5da4a72
Parents:
b8498566aa4a3ab88d5be05cde0f7e4a5652c890
Message:
Rename lpBlockSize to lpVarBlockSize
Location:
Singular/LIB
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/fpadim.lib

    rb849856 r921f32  
    136136  int i;
    137137  for (i = 1; i <= size(L); i++)
    138   {if (entryViolation(L[i], lpBlockSize(basering)))
     138  {if (entryViolation(L[i], lpVarBlockSize(basering)))
    139139    {ERROR("Not allowed monomial/intvec found!");}
    140140  }
     
    907907  // construct the Graph of normal words [Studzinski page 78]
    908908  // construct set of vertices
    909   int v = lpBlockSize(basering); int d = lpDegBound(basering);
     909  int v = lpVarBlockSize(basering); int d = lpDegBound(basering);
    910910  ideal V; poly p,q,w;
    911911  ideal LG = lead(G);
     
    16911691EXAMPLE: example lpDHilbert; shows examples
    16921692"
    1693 {int degbound = lpDegBound(basering);int n = lpBlockSize(basering);
     1693{int degbound = lpDegBound(basering);int n = lpVarBlockSize(basering);
    16941694  if (size(#) > 0){if (typeof(#[1])=="int"){if (#[1] >= 0){degbound = #[1];}}}
    16951695  if (size(#) > 1){if (typeof(#[1])=="int"){if (#[2] > 0){n = #[2];}}}
     
    17331733EXAMPLE: example lpDHilbertSickle; shows examples
    17341734"
    1735 {int degbound = lpDegBound(basering);int n = lpBlockSize(basering);
     1735{int degbound = lpDegBound(basering);int n = lpVarBlockSize(basering);
    17361736  if (size(#) > 0){if (typeof(#[1])=="int"){if (#[1] >= 0){degbound = #[1];}}}
    17371737  if (size(#) > 1){if (typeof(#[1])=="int"){if (#[2] > 0){n = #[2];}}}
     
    17781778SEE ALSO: ncHilb_lib
    17791779"
    1780 {int degbound = lpDegBound(basering);int n = lpBlockSize(basering);
     1780{int degbound = lpDegBound(basering);int n = lpVarBlockSize(basering);
    17811781  if (size(#) > 0){if (typeof(#[1])=="int"){if (#[1] >= 0){degbound = #[1];}}}
    17821782  if (size(#) > 1){if (typeof(#[1])=="int"){if (#[2] > 0){n = #[2];}}}
     
    18091809EXAMPLE: example lpKDimCheck; shows examples
    18101810"
    1811 {int n = lpBlockSize(basering);
     1811{int n = lpVarBlockSize(basering);
    18121812  list L;
    18131813  ideal R;
     
    18441844EXAMPLE: example lpKDim; shows examples
    18451845"
    1846 {int degbound = lpDegBound(basering);int n = lpBlockSize(basering);
     1846{int degbound = lpDegBound(basering);int n = lpVarBlockSize(basering);
    18471847  if (size(#) > 0){if (typeof(#[1])=="int"){if (#[1] >= 0){degbound = #[1];}}}
    18481848  if (size(#) > 1){if (typeof(#[1])=="int"){if (#[2] > 0){n = #[2];}}}
     
    19481948EXAMPLE: example lpSickle; shows examples
    19491949"
    1950 {int degbound = lpDegBound(basering); int n = lpBlockSize(basering);
     1950{int degbound = lpDegBound(basering); int n = lpVarBlockSize(basering);
    19511951  if (size(#) > 0){if (typeof(#[1])=="int"){if (#[1] >= 0){degbound = #[1];}}}
    19521952  if (size(#) > 1){if (typeof(#[1])=="int"){if (#[2] > 0){n = #[2];}}}
     
    19881988EXAMPLE: example lpSickleDim; shows examples
    19891989"
    1990 {int degbound = lpDegBound(basering);int n = lpBlockSize(basering);
     1990{int degbound = lpDegBound(basering);int n = lpVarBlockSize(basering);
    19911991  if (size(#) > 0){if (typeof(#[1])=="int"){if (#[1] >= 0){degbound = #[1];}}}
    19921992  if (size(#) > 1){if (typeof(#[1])=="int"){if (#[2] > 0){n = #[2];}}}
     
    20282028EXAMPLE: example lpSickleHil; shows examples
    20292029"
    2030 {int degbound = lpDegBound(basering);int n = lpBlockSize(basering);
     2030{int degbound = lpDegBound(basering);int n = lpVarBlockSize(basering);
    20312031  if (size(#) > 0){if (typeof(#[1])=="int"){if (#[1] >= 0){degbound = #[1];}}}
    20322032  if (size(#) > 1){if (typeof(#[1])=="int"){if (#[2] > 0){n = #[2];}}}
     
    20822082  if (m == 1)
    20832083  {if (d == 0)
    2084     {if (h == 0) {return(lpSickle(G,degbound,lpBlockSize(basering)));}
    2085       else        {return(lpSickleHil(G,degbound,lpBlockSize(basering)));}
     2084    {if (h == 0) {return(lpSickle(G,degbound,lpVarBlockSize(basering)));}
     2085      else        {return(lpSickleHil(G,degbound,lpVarBlockSize(basering)));}
    20862086    }
    20872087    else
    2088     {if (h == 0) {return(lpSickleDim(G,degbound,lpBlockSize(basering)));}
    2089       else {return(lpDHilbertSickle(G,degbound,lpBlockSize(basering)));}
     2088    {if (h == 0) {return(lpSickleDim(G,degbound,lpVarBlockSize(basering)));}
     2089      else {return(lpDHilbertSickle(G,degbound,lpVarBlockSize(basering)));}
    20902090    }
    20912091  }
     
    20932093  {if (d == 0)
    20942094    {if (h == 0) {ERROR("You request to do nothing, so relax and do so");}
    2095       else        {return(lpHilbert(G,degbound,lpBlockSize(basering)));}
     2095      else        {return(lpHilbert(G,degbound,lpVarBlockSize(basering)));}
    20962096    }
    20972097    else
    2098     {if (h == 0) {return(lpKDim(G,degbound,lpBlockSize(basering)));}
    2099       else {return(lpDHilbert(G,degbound,lpBlockSize(basering)));}
     2098    {if (h == 0) {return(lpKDim(G,degbound,lpVarBlockSize(basering)));}
     2099      else {return(lpDHilbert(G,degbound,lpVarBlockSize(basering)));}
    21002100    }
    21012101  }
  • Singular/LIB/fpaprops.lib

    rb849856 r921f32  
    9191  // if longest word has length 1 we handle it as a special case
    9292  if (l == 1) {
    93     int n = lpBlockSize(basering); // variable count
     93    int n = lpVarBlockSize(basering); // variable count
    9494    int k = size(G);
    9595    if (k == n) { // only the field left
     
    746746    ERROR("Ufnarovskij graph not implemented for l = 1");
    747747  }
    748   int lV = lpBlockSize(basering);
     748  int lV = lpVarBlockSize(basering);
    749749  // TODO: what if l <= 0?
    750750  dbprint("computing standard words");
     
    836836    return (words); // no standard words
    837837  }
    838   int lV = lpBlockSize(basering); // variable count
     838  int lV = lpVarBlockSize(basering); // variable count
    839839  list prevWords = ivStandardWords(G, length - 1);
    840840  list words;
     
    907907  // if longest word has length 1, or G is the zero ideal, we handle it as a special case
    908908  if (l == 1 || size(G) == 0) {
    909     int n = lpBlockSize(basering); // variable count
     909    int n = lpVarBlockSize(basering); // variable count
    910910    int k = size(G);
    911911    if (k == n) { // V = {1} no edges
     
    10041004  if (size(G1) > 0) {
    10051005    while (size(G1) > 0) {
    1006       if (lpBlockSize(R) > 1) {
     1006      if (lpVarBlockSize(R) > 1) {
    10071007        def @R = R - string(G1[1]);
    10081008        R = @R;
     
    10821082{
    10831083  list LG = lpId2ivLi(lead(G));
    1084   int n = lpBlockSize(basering);
     1084  int n = lpVarBlockSize(basering);
    10851085  int degbound = lpDegBound(basering);
    10861086
     
    13841384/* // removes a variable from a letterplace ring (a bit of a hack) */
    13851385/* static proc lpDelVar(int index) { */
    1386 /*   int lV = lpBlockSize(basering); // number of variables in the main block */
     1386/*   int lV = lpVarBlockSize(basering); // number of variables in the main block */
    13871387/*   int d = lpDegBound(basering); // degree bround */
    13881388/*   list LR = ringlist(basering); */
  • Singular/LIB/freegb.lib

    rb849856 r921f32  
    2626isFreeAlgebra(r);                check whether r is a letterplace ring (free algebra)
    2727lpDegBound(R);                   returns the degree bound of a letterplace ring
    28 lpBlockSize(R);                  returns the size of the letterplace blocks
     28lpVarBlockSize(R);               returns the size of the letterplace blocks
    2929
    3030letplaceGBasis(I);               (deprecated, use twostd) two-sided Groebner basis of a letterplace ideal I
     
    126126  ring r = 0,(x(1),y(1),x(2),y(2),x(3),y(3),x(4),y(4)),dp;
    127127  def R = setLetterplaceAttributes(r, 4, 2); setring R;
    128   lpBlockSize(R);
     128  lpVarBlockSize(R);
    129129  lieBracket(x(1),y(1),2);
    130130}
     
    10181018}
    10191019
    1020 proc lpBlockSize(def R)
    1021 "USAGE:  lpBlockSize(R); R a letterplace ring
     1020proc lpVarBlockSize(def R)
     1021"USAGE:  lpVarBlockSize(R); R a letterplace ring
    10221022RETURN:  int
    1023 PURPOSE: returns the block size of the letterplace ring, that is the number of variables of the original ring.
    1024 EXAMPLE: example lpBlockSize; shows examples
     1023PURPOSE: returns the variable block size of the letterplace ring, that is the number of variables of the original ring.
     1024EXAMPLE: example lpVarBlockSize; shows examples
    10251025"
    10261026{
     
    10361036  ring r = 0,(x,y,z),dp;
    10371037  def R = freeAlgebra(r, 7);
    1038   lpBlockSize(R);
     1038  lpVarBlockSize(R);
    10391039}
    10401040
     
    11281128  def A = makeLetterplaceRing(2); // same as  makeLetterplaceRing(2,0)
    11291129  setring A;  A;
    1130   lpBlockSize(A);
     1130  lpVarBlockSize(A);
    11311131  lpDegBound(A);  // degree bound
    11321132  setring r; def B = makeLetterplaceRing(2,1); // to compare:
    11331133  setring B;  B;
    1134   lpBlockSize(B);
     1134  lpVarBlockSize(B);
    11351135  lpDegBound(B);  // degree bound
    11361136  setring r; def C = makeLetterplaceRing(2,2); // to compare:
     
    12191219  setring A;
    12201220  A;
    1221   lpBlockSize(A);// number of variables in the main block
     1221  lpVarBlockSize(A);// number of variables in the main block
    12221222  lpDegBound(A);  // degree bound
    12231223}
     
    13241324  setring A;
    13251325  A;
    1326   lpBlockSize(A); // number of variables in the main block
     1326  lpVarBlockSize(A); // number of variables in the main block
    13271327  lpDegBound(A);  // degree bound
    13281328}
     
    13881388  setring A;
    13891389  A;
    1390   lpBlockSize(A); // number of variables in the main block
     1390  lpVarBlockSize(A); // number of variables in the main block
    13911391  lpDegBound(A);  // degree bound
    13921392}
     
    14941494  setring A;
    14951495  A;
    1496   lpBlockSize(A); // number of variables in the main block
     1496  lpVarBlockSize(A); // number of variables in the main block
    14971497  lpDegBound(A);  // degree bound
    14981498}
     
    29412941  // make new ring
    29422942  def save = basering;
    2943   int norigvars = lpBlockSize(save);
     2943  int norigvars = lpVarBlockSize(save);
    29442944  def Rtagged; def temp = save;
    29452945  for (int i = 1; i <= size(I); i++) {
     
    29482948  } kill i;
    29492949  // currently R + "var" doesn't preserve uptodeg
    2950   Rtagged = setLetterplaceAttributes(Rtagged, lpBlockSize(Rtagged), lpDegBound(save));
     2950  Rtagged = setLetterplaceAttributes(Rtagged, lpVarBlockSize(Rtagged), lpDegBound(save));
    29512951  setring Rtagged;
    29522952
     
    30603060{if (I==intvec(0)) {return(intvec(0));}
    30613061 int j,k,l;
    3062  int n = lpBlockSize(basering); int d = lpDegBound(basering);
     3062 int n = lpVarBlockSize(basering); int d = lpDegBound(basering);
    30633063 intvec w; j = 1;
    30643064 while (j <= d)
     
    30963096"
    30973097{int i,j,k,r1,r2; intvec D;
    3098  int n = lpBlockSize(basering);
     3098 int n = lpVarBlockSize(basering);
    30993099 k = size(V) div n; r1 = 0; r2 = 0;
    31003100 for (i=1; i<= k; i++)
     
    31413141
    31423142 int i,j,r; intvec T; list R;
    3143  int n = lpBlockSize(basering);
     3143 int n = lpVarBlockSize(basering);
    31443144 int k = size(V) - size(W) + 1;
    31453145 if (intvec(V[1..size(W)])-W == 0){R[1]=0;}
     
    33093309  }
    33103310
    3311   int lV = lpBlockSize(basering); // variable count
     3311  int lV = lpVarBlockSize(basering); // variable count
    33123312  ideal prevMonomials = lpMonomialsWithHoles(d - 1);
    33133313
     
    33353335static proc getlpCoeffs(poly q, poly p)
    33363336{list R; intvec cq,t,lv,rv,bla;
    3337  int n = lpBlockSize(basering); int d = lpDegBound(basering);
     3337 int n = lpVarBlockSize(basering); int d = lpDegBound(basering);
    33383338 int i;
    33393339 cq = leadexp(p)-leadexp(q); /* p/q */
     
    33833383  int i;
    33843384  for (i = 1; i <= size(L); i++)
    3385   {if (entryViolation(L[i], lpBlockSize(basering)))
     3385  {if (entryViolation(L[i], lpVarBlockSize(basering)))
    33863386    {ERROR("Not allowed monomial/intvec found!");}
    33873387  }
     
    34273427{int r = 0; intvec w;
    34283428 intvec l = leadexp(p);
    3429  int n = lpBlockSize(basering); int d = lpDegBound(basering);
     3429 int n = lpVarBlockSize(basering); int d = lpDegBound(basering);
    34303430 int i,j,c,c1;
    34313431 while (1 <= d)
     
    38223822  if (p == 0) {ERROR("Monomial is not allowed to equal zero");}
    38233823  intvec lep = leadexp(p);
    3824   for ( i = 1; i <= lpBlockSize(basering); i++) {if (lep[i] == 1) {I = i; break;}}
    3825   for (i = (lpBlockSize(basering)+1); i <= size(lep); i++)
     3824  for ( i = 1; i <= lpVarBlockSize(basering); i++) {if (lep[i] == 1) {I = i; break;}}
     3825  for (i = (lpVarBlockSize(basering)+1); i <= size(lep); i++)
    38263826  {if (lep[i] == 1)
    3827     { j = (i mod lpBlockSize(basering));
    3828       if (j == 0) {I = I,lpBlockSize(basering);}
     3827    { j = (i mod lpVarBlockSize(basering));
     3828      if (j == 0) {I = I,lpVarBlockSize(basering);}
    38293829      else {I = I,j;}
    38303830    }
  • Singular/LIB/ncHilb.lib

    rb849856 r921f32  
    7575    def save = basering;
    7676    int sz=size(#);
    77     int lV=lpBlockSize(save); // nvars(orig comm ring)
     77    int lV=lpVarBlockSize(save); // nvars(orig comm ring)
    7878    int ig=0;
    7979    int mgrad=0;
     
    403403EXAMPLE: example rcolon; shows an example"
    404404{
    405     int lV =  lpBlockSize(R); //nvars(save);
     405    int lV =  lpVarBlockSize(R); //nvars(save);
    406406    if (lV == 0)
    407407    {
Note: See TracChangeset for help on using the changeset viewer.