Changeset 5d623c in git


Ignore:
Timestamp:
Dec 2, 2016, 6:49:32 PM (7 years ago)
Author:
Sharwan Tiwari <shrawant@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
665dab88a13186ce5e6abca704e42280baad6b91
Parents:
174bcf3262ce524919d5ef06586fee3331f4cd94
Message:
multi-graded Hilbert series of non-commutative monomial algebras
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/ncHilb.lib

    r174bcf r5d623c  
    11//////////////////////////////////////////////////////////////////////////////
    2 version="version nc_hilb.lib 4.0.3.3 Sep_2016 "; // $Id$
     2version="version nc_hilb.lib 4.0.3.3 Nov_2016 "; // $Id$
    33category="Noncommutative algebra";
    44info="
    5 LIBRARY:  ncHilb.lib: A library for computing the Hilbert series of the
    6                        non-commutative monomial algebras (e.g. k<x,y,z>/I,
    7                       where I is a two-sided ideal).
     5LIBRARY:  ncHilb.lib: A library for computing graded and multi-graded Hilbert
     6                      series of the non-commutative monomial algebras
     7                      (e.g. k<x,y,z>/I, where I is a two-sided ideal).
    88
    99AUTHOR:   Sharwan K. Tiwari   stiwari@mathematik.uni-kl.de
     
    1414
    1515PROCEDURES:
    16           nchilb(L, d, #); Hilbert series of a non-commutative monomial algebra
     16          nchilb(L,d,#); Hilbert series of a non-commutative monomial algebra
    1717
    1818";
     
    2323"USAGE:  nchilb(list of relations, an integer, optional);
    2424         L is a list of modules (each module represents a free-polynomial),
    25          d is an integer for the degree bound,
    26          # != NULL for non-finitely generated ideals;
    27 NOTE  : The input ideal needs to be given in special form. It is a list
    28         of modules, where each generator of every module represents a
    29         monomial times a coefficient in the free associative algebra.
    30         The first entry, in each generator, represents a coefficient and
    31         every next entry is a variable.
    32         Ex. module p1=[1,y,z],[-1,z,y] represents the poly y*z-z*y;
     25         d is an integer for the degree bound (maximal total degree of the
     26            polynomials of generating set of input ideal),
     27         #[]=1 represents the case of non-finitely generated ideals,
     28         #[]=2 is for the computation of multi-graded Hilbert series, and
     29         #[]=3 is to print the details about the orbit and system of equation.
     30
     31NOTE  : The generating set of input ideal should be a Groebner basis and needs
     32        to be given in a special form. It is a list of modules, where each
     33        generator of every module represents a monomial times a coefficient
     34        in the free associative algebra. The first entry, in each generator,
     35        represents a coefficient and every next entry is a variable.
     36        Ex: module p1=[1,y,z],[-1,z,y] represents the poly y*z-z*y;
    3337            module p2=[1,x,z,x],[-1,z,x,z] represents the poly x*z*x-z*x*z
    3438        for more details about the input, see examples.
    3539EXAMPLE: example nchilb; shows an example "
    3640{
    37 
    3841    if (d<1)
    3942    {
     
    4447    int sz=size(#);
    4548    int lV=nvars(save);
    46 
    47     def R =makeLetterplaceRing(d);
     49    int ig, mgrad, odp;
     50    int i=1;
     51   
     52    while(typeof(#[i])=="int" && i<=sz)
     53    {
     54      if(#[i] == 1)
     55      {
     56        ig = 1;
     57      }
     58      else
     59      {
     60        if(#[i] == 2)
     61        {
     62          mgrad = 2;
     63        }
     64        else
     65        {
     66          if(#[i] == 3)
     67          {
     68            odp = 3;
     69          }
     70          else
     71          {
     72            ERROR("error:only int 1,2,3 are allowed as optional parameters");
     73          }
     74        }
     75      }
     76      i = i + 1;
     77    }
     78    if( i <= sz)
     79    {
     80      ERROR("error:only int 1,2,3 are allowed as optional parameters");
     81    }
     82    def R = makeLetterplaceRing(2*d);
    4883    setring R;
    4984    ideal I;
     
    5388    setring save;
    5489    module M;
    55     int i,j,k,sw,sm,slm;
     90    int j,k,sw,sm,slm;
    5691    vector w;
    5792    poly pc=0;
    5893    intvec v;
    59     slm = size(L_wp);                  // number of polys in the given ideal
    60 
     94    slm = size(L_wp);              // number of polys in the given ideal
    6195    for (i=1; i<=slm; i++)
    6296    {
    6397        M  = L_wp[i];
    64         sm = ncols(M);                 // number of words in the free-poly M
     98        sm = ncols(M);            // number of words in the free-poly M
    6599        for (j=1; j<=sm; j++)
    66100        {
     
    87121    }
    88122    setring R;
    89 
    90     ideal J = system("freegb",I,d,lV);
    91 
    92     //Groebner Basis is computed for the given ideal.
    93     //now compute the leading monomials of the Groebner Basis
    94 
     123    I=simplify(I,2);
    95124    ideal J_lm;
    96     for(i=1;i<=size(J);i++)
    97     {
    98         J_lm[i]=leadmonom(J[i]);
    99     }
    100 
    101     setring save;
    102     def A =makeLetterplaceRing(2*d);
    103     setring A;
    104     ideal I=imap(R, J_lm);
    105 
     125    for(i=1;i<=size(I);i++)
     126    {
     127        J_lm[i]=leadmonom(I[i]);
     128    }
    106129    //compute the Hilbert series
    107 
    108     if(sz==1)                     // non-finitely generated case
    109     {
    110         system("nc_hilb",I,lV,1);
    111     }
    112     else                         // finitely generated case
    113     {
    114         system("nc_hilb",I,lV);
    115     }
     130   
     131    system("nc_hilb", J_lm, lV, ig, mgrad, odp);
    116132}
    117133example
    118134{
    119135"EXAMPLE:"; echo = 2;
    120     ring r=0,(x,y,z),dp;
    121     module p1=[1,y,z],[-1,z,y];           //represents the poly y*z-z*y
    122     module p2=[1,x,z,x],[-1,z,x,z];    //represents the poly x*z*x-z*x*z
    123     list l1=list(p1,p2);
    124     nchilb(l1,6,1); //third argument is for non-finitely generated case
    125 
    126     ring r=0,(x,y,z,w),dp;
    127     module p1=[1,y,x],[-1,x,y];            //represents the poly y*x-x*y
    128     module p2=[1,z,x],[-1,x,z];
    129     module p3=[1,w,x],[-1,x,w];
    130     module p4=[1,z,y],[-1,y,z];
    131     module p5=[1,w,y],[-1,y,w];
    132     module p6=[1,w,z],[-1,z,w];
    133     list l2=list(p1,p2,p3,p4,p5,p6);
    134     nchilb(l2,5);
    135136
    136137    ring r=0,(X,Y,Z),dp;
    137     module p1 =[1,Y,Z];                //represents the poly Y*Z
    138     module p2 =[1,Y,Z,X];
     138    module p1 =[1,Y,Z];             //represents the poly Y*Z
     139    module p2 =[1,Y,Z,X];          //represents the poly Y*Z*X
    139140    module p3 =[1,Y,Z,Z,X,Z];
    140141    module p4 =[1,Y,Z,Z,Z,X,Z];
     
    143144    module p7 =[1,Y,Z,Z,Z,Z,Z,Z,X,Z];
    144145    module p8 =[1,Y,Z,Z,Z,Z,Z,Z,Z,X,Z];
    145     list l3=list(p1,p2,p3,p4,p5,p6,p7,p8);
    146     nchilb(l3,10);
    147 
    148     ring r=0,U(1..3),dp;
    149     module p1=[1,U(2),U(3),U(3)];
    150     module p2=[1,U(2),U(2),U(3)];
    151     module p3=[1,U(1),U(3),U(3)];
    152     module p4=[1,U(1),U(3),U(2)];
    153     module p5=[1,U(1),U(2),U(3)];
    154     module p6=[1,U(1),U(2),U(2)];
    155     module p7=[1,U(1),U(1),U(3)];
    156     module p8=[1,U(1),U(1),U(2)];
    157     module p9=[1,U(2),U(3),U(2),U(3)];
    158     module p10=[1,U(2),U(3),U(1),U(3)];
    159     module p11=[1,U(2),U(3),U(1),U(2)];
    160     module p12=[1,U(1),U(3),U(1),U(3)];
    161     module p13=[1,U(1),U(3),U(1),U(2)];
    162     module p14=[1,U(1),U(2),U(1),U(3)];
    163     module p15=[1,U(1),U(2),U(1),U(2)];
    164     module p16=[1,U(2),U(3),U(2),U(1),U(3)];
    165     module p17=[1,U(2),U(3),U(2),U(1),U(2)];
    166     module p18=[1,U(2),U(3),U(2),U(2),U(1),U(3)];
    167     module p19=[1,U(2),U(3),U(2),U(2),U(1),U(2)];
    168     module p20=[1,U(2),U(3),U(2),U(2),U(2),U(1),U(3)];
    169     module p21=[1,U(2),U(3),U(2),U(2),U(2),U(1),U(2)];
    170     list ll=list(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,
    171     p14,p15,p16,p17,p18,p19,p20,p21);
    172     nchilb(ll,7,1);
     146    list l1=list(p1,p2,p3,p4,p5,p6,p7,p8);
     147    nchilb(l1,10);
     148
     149    ring r=0,(x,y,z),dp;
     150
     151    module p1=[1,y,z],[-1,z,y];               //y*z-z*y
     152    module p2=[1,x,z,x],[-1,z,x,z];           // x*z*x-z*x*z
     153    module p3=[1,x,z,z,x,z],[-1,z,x,z,z,x];   // x*z^2*x*z-z*x*z^2*x
     154    module p4=[1,x,z,z,z,x,z];[-1,z,x,z,z,x,x]; // x*z^3*x*z-z*x*z^2*x^2
     155    list l2=list(p1,p2,p3,p4);
     156   
     157    nchilb(l2,6,1); //third argument '1' is for non-finitely generated case
     158
     159    ring r=0,(a,b),dp;
     160    module p1=[1,a,a,a];
     161    module p2=[1,a,b,b];
     162    module p3=[1,a,a,b];
     163   
     164    list l3=list(p1,p2,p3);
     165    nchilb(l3,5,2);//third argument '2' is to compute multi-graded HS
    173166
    174167    ring r=0,(x,y,z),dp;
     
    179172    module p5=[1,x,z,z,x,z];
    180173
    181     list l1=list(p1,p2,p3,p4,p5);
    182     nchilb(l1,7);
     174    list l4=list(p1,p2,p3,p4,p5);
     175    nchilb(l4,7,3); //third argument '3' is to print the details
     176                    // of the orbit and system
     177
     178    ring r=0,(x,y,z),dp;
     179
     180    module p1=[1,y,z,z];
     181    module p2=[1,y,y,z];
     182    module p3=[1,x,z,z];
     183    module p4=[1,x,z,y];
     184    module p5=[1,x,y,z];
     185    module p6=[1,x,y,y];
     186    module p7=[1,x,x,z];
     187    module p8=[1,x,x,y];
     188    module p9=[1,y,z,y,z];
     189    module p10=[1,y,z,x,z];
     190    module p11=[1,y,z,x,y];
     191    module p12=[1,x,z,x,z];
     192    module p13=[1,x,z,x,y];
     193    module p14=[1,x,y,x,z];
     194    module p15=[1,x,y,x,y];
     195    module p16=[1,y,z,y,x,z];
     196    module p17=[1,y,z,y,x,y];
     197    module p18=[1,y,z,y,y,x,z];
     198    module p19=[1,y,z,y,y,x,y];
     199    module p20=[1,y,z,y,y,y,x,z];
     200    module p21=[1,y,z,y,y,y,x,y];
     201
     202    list l5=list(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,
     203    p14,p15,p16,p17,p18,p19,p20,p21);
     204    nchilb(l5,7,1,2,3);
    183205}
    184206
  • Singular/extra.cc

    r174bcf r5d623c  
    354354    if(strcmp(sys_cmd,"nc_hilb") == 0)
    355355    {
    356       ideal i;
    357       int lV;
     356      ideal i; int lV;
    358357      bool ig = FALSE;
     358      bool mgrad = FALSE;
     359      bool autop = FALSE;
    359360      if((h != NULL)&&(h->Typ() == IDEAL_CMD))
    360361        i = (ideal)h->Data();
    361       else
    362       {
     362      else{
    363363        WerrorS("ideal expected");
    364364        return TRUE;
     
    367367      if((h != NULL)&&(h->Typ() == INT_CMD))
    368368        lV = (int)(long)h->Data();
    369       else
    370       {
     369      else{
    371370        WerrorS("int expected");
    372371        return TRUE;
    373372      }
    374373      h = h->next;
    375       if(h != NULL)
    376         ig = TRUE;
    377       HilbertSeries_OrbitData(i,lV,ig);
     374      while((h != NULL)&&(h->Typ() == INT_CMD))
     375      {
     376        if((int)(long)h->Data() == 1)
     377          ig = TRUE;
     378        else if((int)(long)h->Data() == 2)
     379          mgrad = TRUE;
     380        else if((int)(long)h->Data() == 3)
     381           autop = TRUE;
     382        h = h->next;
     383      }
     384      if(h != NULL){
     385        WerrorS("int 1,2,3 are expected");
     386        return TRUE;
     387      }
     388      HilbertSeries_OrbitData(i, lV, ig, mgrad, autop);
    378389      return(FALSE);
    379390    }
  • Tst/Short/nchilb_test1.res.gz.uu

    r174bcf r5d623c  
    11begin 664 nchilb_test1.res.gz
    2 M'XL("&?R_%<``VYC:&EL8E]T97-T,2YR97,`7=#!;L(P#`#0>[["JG9(A2FX
    3 MW<HFU!RF'4":M@.[(80H5%ND+%2-$:5?OV0,BG:QD_C94KSX>)F_`0`I>)T_
    4 M0\2.$Z/+:"H6?Y54@7]<:ZM9QE,1,B@%=ONE3;GFRC$EMCHFCC=\;<I^QT5V
    5 M._/HW\![!=?S0^)#H^TG-,4898LG[&+<U;W.E0_?^]W!5%!3L:1`5K@<$G9X
    6 M6O5P<@O3`%LOV@OUEQO\&+#1CL%0$;*L">LT[L53$.=/2D.8(_FBH)'D;,#I
    7 E,.,!Q4*\-Z5?A]-=!07DEV8:GW<65G)PTG?>B1]#F,G9:0$`````
     2M'XL("%BP05@``VYC:&EL8E]T97-T,2YR97,`;=(];\(P$`;@W;_BA#HDZC7E
     3M\@&T*!FJ#D7JQT`'VJI"!%RP9((5&]&?WX2D`;OU8LGWO.?A;OIZ/WD&`,K@
     4M<7('/:--($7>&[-I6PDSJ![GHA#&\\>LOB'+H%ANA,SGAFM#0<$/@38+TX6B
     5M8[M>L7RHD-,PSJ`^I2C64*9]]&;XAN\^KM3))(W9[E9[R4$1I!]4J\\3&=@D
     6M_"4X.T-#&T4=JIC5;63#^`RZ],:FB44=3'T;#QSL<K+Y\`]W`Z$=&/T3<"-1
     7M$Y%"&Y"4UK>G"%6(*D(5HTI0#5`-48W\4ZJ=6C-V3Q)2OZJRI\6WV"XD2%ZL
     8MS09V7W#8E2L-*82,O91YM2QM*86(,5;O`R\-:%X*KF\977LFO(K,)?FL^RMI
     935J[>J+WVR!]?L!^-5=7RJ`(`````
    810`
    911end
  • Tst/Short/nchilb_test1.stat

    r174bcf r5d623c  
    1 1 >> tst_memory_0 :: 1476194919:4033, 64 bit:4.0.3:x86_64-Linux:topgun:317832
    2 1 >> tst_memory_1 :: 1476194919:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2228224
    3 1 >> tst_memory_2 :: 1476194919:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2234272
    4 1 >> tst_timer_1 :: 1476194919:4033, 64 bit:4.0.3:x86_64-Linux:topgun:7
     11 >> tst_memory_0 :: 1480699992:4100, 64 bit:4.1.0:x86_64-Linux:topgun:309328
     21 >> tst_memory_1 :: 1480699992:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2228224
     31 >> tst_memory_2 :: 1480699992:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2238384
     41 >> tst_timer_1 :: 1480699992:4100, 64 bit:4.1.0:x86_64-Linux:topgun:7
  • Tst/Short/nchilb_test1.tst

    r174bcf r5d623c  
    22tst_init();
    33LIB"ncHilb.lib";
    4 
    5   ring r=0,(x,y,z),dp;
    6   module p1=[1,y,z],[-1,z,y];
    7   module p2=[1,x,z,x],[-1,z,x,z];
    8   list l1=list(p1,p2);
    9   nchilb(l1,6,1);
     4    ring r=0,(X,Y,Z),dp;
     5    module p1 =[1,Y,Z];
     6    module p2 =[1,Y,Z,X];
     7    module p3 =[1,Y,Z,Z,X,Z];
     8    module p4 =[1,Y,Z,Z,Z,X,Z];
     9    module p5 =[1,Y,Z,Z,Z,Z,X,Z];
     10    module p6 =[1,Y,Z,Z,Z,Z,Z,X,Z];
     11    module p7 =[1,Y,Z,Z,Z,Z,Z,Z,X,Z];
     12    module p8 =[1,Y,Z,Z,Z,Z,Z,Z,Z,X,Z];
     13    list l1=list(p1,p2,p3,p4,p5,p6,p7,p8);
     14    nchilb(l1,10);
    1015tst_status(1);$
  • Tst/Short/nchilb_test2.res.gz.uu

    r174bcf r5d623c  
    11begin 664 nchilb_test2.res.gz
    2 M'XL("&'R_%<``VYC:&EL8E]T97-T,BYR97,`7=%/2\,P&`;P>S[%R_#0LG=U
    3 M2?^HE.8@'AR('N9MC&&WHH%80YO1M9_>9)&V,9<W)+_WN3S;]Z?-*P!0#B^;
    4 M1UCH5D=2E(N<;/]^&`?S>!"UT$&8$SN!<ZB/7T*6!UVUFD5UU46M_M#C4GR-
    5 M6]3'9X/^!28<QGL:@3V-J#^A*=887+#'`;L03VK:R/A5??^<SK("18L=->RR
    6 MQ]V*HMG83_3.I\S28:+#C-[[-+:TFV@WHP\^35QJ[V@_3Z5KGZ8N=:2S5$I]
    7 MFCDZ.#IXE#DJ1:M!LL+.0%%4#%6,*D&5HLK"R<?.NY("R3`UGX3>!CI9)3I>
    8 G9IJ9N:0A(6]-:1IMQ5!!`>F8D+C:;:OG-J!A?D-^`:$K2S\L`@``
     2M'XL("%^P05@``VYC:&EL8E]T97-T,BYR97,`79)=;\(@%(;O^14G9A=EQ4Z@
     3MUFU->['L8B;[N'!WQA@_F))@;0K&ZJ]?*;9=Q\UY@><]!SC,OE^GGP!`4WB?
     4MOL#`:!,HN1[$:';;82E4BTN92>/A&-D(:0K99B_5>FF$-BS(Q#G09F5:$Z_3
     5M#;+-6P7]2QBF8$<ALQT4R8AX);F0*R;;O&/&*;0Z"FK^<-R>E("<)G-J#0LR
     6M'U)R)9=%9YND/919M*R8LH&KR1_\L8_S!G=<9ZDS=+:GOBWL;+<"/6-M+>]W
     7M(O,FV'<B:@3'_K46XT:$C6!X:`/%35TZ<G65U`842VST<DIR1G).\A"W)Z34
     8MD>V<N2=T/?,4(Q&A.`:$/E:E/*P4*)'MS!Z./W`^%EL-"7"$OHIUU>O;5@(1
     9M0LBV4Q0&M"BDT,^(/GB&^X8-N?&KD[8%N?LT]D^<='6'^`[]`I,WI-1J`@``
    910`
    1011end
  • Tst/Short/nchilb_test2.stat

    r174bcf r5d623c  
    1 1 >> tst_memory_0 :: 1476194913:4033, 64 bit:4.0.3:x86_64-Linux:topgun:339544
    2 1 >> tst_memory_1 :: 1476194913:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2228224
    3 1 >> tst_memory_2 :: 1476194913:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2234496
    4 1 >> tst_timer_1 :: 1476194913:4033, 64 bit:4.0.3:x86_64-Linux:topgun:7
     11 >> tst_memory_0 :: 1480699999:4100, 64 bit:4.1.0:x86_64-Linux:topgun:307448
     21 >> tst_memory_1 :: 1480699999:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2228224
     31 >> tst_memory_2 :: 1480699999:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2234560
     41 >> tst_timer_1 :: 1480699999:4100, 64 bit:4.1.0:x86_64-Linux:topgun:7
  • Tst/Short/nchilb_test2.tst

    r174bcf r5d623c  
    22tst_init();
    33LIB"ncHilb.lib";
     4    ring r=0,(x,y,z),dp;
    45
    5     ring r=0,(x,y,z,w),dp;
    6     module p1=[1,y,x],[-1,x,y];
    7     module p2=[1,z,x],[-1,x,z];
    8     module p3=[1,w,x],[-1,x,w];
    9     module p4=[1,z,y],[-1,y,z];
    10     module p5=[1,w,y],[-1,y,w];
    11     module p6=[1,w,z],[-1,z,w];
    12     list l2=list(p1,p2,p3,p4,p5,p6);
    13     nchilb(l2,5);
     6    module p1=[1,y,z],[-1,z,y];
     7    module p2=[1,x,z,x],[-1,z,x,z];
     8    module p3=[1,x,z,z,x,z],[-1,z,x,z,z,x];
     9    module p4=[1,x,z,z,z,x,z];[-1,z,x,z,z,x,x];
     10    list l2=list(p1,p2,p3,p4);
     11   
     12    nchilb(l2,6,1);
    1413tst_status(1);$
  • Tst/Short/nchilb_test3.res.gz.uu

    r174bcf r5d623c  
    11begin 664 nchilb_test3.res.gz
    2 M'XL("%OR_%<``VYC:&EL8E]T97-T,RYR97,`;=)-2\0P$`;@>W[%4#RD.-:F
    3 MZ9>4YB`>7!`]K(=5D<7N%@W4&IHL@K_>U'7;;/22"9GGG4MF>7^UN`4`)N!F
    4 M<0F!T2;J9!-49/G;2038Q[7LI:%A1<8*0D"_>9-=LS:M-CSJV\](FQ<SA?C/
    5 MN*#?7%OD#4P%3/<LLL<@^U<8ZACI"A_P,<2MFG4N[/'^L=UU+2@&]1,;S?,,
    6 M"A<D!X`KAY0NX1.QZ&C2A<M2AWF0Q2[,CJ!/F4MSC_HX<7'Q!_N<N[S\A_N!
    7 M=`QT4AOH>#U6JABJ!!5'E:+*4.6H"E1E.&>R,;/_;-IQ9+'M$79.37+&S2D+
    8 B";D;&KL26GZU4`.?@OE^;\:UV&G*PNJ$?`-)^23#;0(`````
     2M'XL("&:P05@``VYC:&EL8E]T97-T,RYR97,`79');L,@$(;O/,7(Z@$WQ`VF
     3M[F:90]5#(W4YI+>JC4Q,$R1B6T"4/G[!=IRD(#'+_\UH-"P^GN9O`$`YO,P?
     4M(7+6)5J)*$>+04DY^.12U<KA.$?!`N=0KS9*BZ63UK&DEOO$NM*-1:QK%]6K
     5M9P_]:WC-8?2S!,(QJEZ#*68$ET3$I&J/]`WOB&U3[;2$EA:?E)3A?AV9VW,F
     6M[1E!Q`ES=\ZP0Y]3YKYG#C&=]=-I91UH5@2+6TK:E+0L'LLH[<OZC6#-2$92
     7M+Z/7\E=M2PU:UFNW@>8']HVI+!3`$'HWPB]RD`K($$)A5](XL-(H:1\0=IC&
     8IW^DDF`F-K[KXTN'4)Z>C/PV/E]$XS_!CX4-VUF/Y!?H#ZRWT$><!````
    99`
    1010end
  • Tst/Short/nchilb_test3.stat

    r174bcf r5d623c  
    1 1 >> tst_memory_0 :: 1476194907:4033, 64 bit:4.0.3:x86_64-Linux:topgun:318704
    2 1 >> tst_memory_1 :: 1476194907:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2228224
    3 1 >> tst_memory_2 :: 1476194907:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2238096
    4 1 >> tst_timer_1 :: 1476194907:4033, 64 bit:4.0.3:x86_64-Linux:topgun:7
     11 >> tst_memory_0 :: 1480700006:4100, 64 bit:4.1.0:x86_64-Linux:topgun:305144
     21 >> tst_memory_1 :: 1480700006:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2228224
     31 >> tst_memory_2 :: 1480700006:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2233664
     41 >> tst_timer_1 :: 1480700006:4100, 64 bit:4.1.0:x86_64-Linux:topgun:7
  • Tst/Short/nchilb_test3.tst

    r174bcf r5d623c  
    33LIB"ncHilb.lib";
    44
    5   ring r=0,(X,Y,Z),dp;
    6   module p1 =[1,Y,Z];
    7   module p2 =[1,Y,Z,X];
    8   module p3 =[1,Y,Z,Z,X,Z];
    9   module p4 =[1,Y,Z,Z,Z,X,Z];
    10   module p5 =[1,Y,Z,Z,Z,Z,X,Z];
    11   module p6 =[1,Y,Z,Z,Z,Z,Z,X,Z];
    12   module p7 =[1,Y,Z,Z,Z,Z,Z,Z,X,Z];
    13   module p8 =[1,Y,Z,Z,Z,Z,Z,Z,Z,X,Z];
    14   list l3=list(p1,p2,p3,p4,p5,p6,p7,p8);
    15   nchilb(l3,10);
     5    ring r=0,(a,b),dp;
     6    module p1=[1,a,a,a];
     7    module p2=[1,a,b,b];
     8    module p3=[1,a,a,b];
     9   
     10    list l3=list(p1,p2,p3);
     11    nchilb(l3,5,2);
    1612tst_status(1);$
  • Tst/Short/nchilb_test4.res.gz.uu

    r174bcf r5d623c  
    11begin 664 nchilb_test4.res.gz
    2 M'XL("%3R_%<``VYC:&EL8E]T97-T-"YR97,`A91=2\,P%(;O^RO"\*+%K/8D
    3 M_1JCO1`O'(A>3*]$AMN*%FH-:X;@K_=TU2W)Z?"BZ4>>][QIWD.6CS>+>\88
    4 ME.QN<<TFNM-A4Z\G<V_Y.R-*AA]7=5MK/YA[_9V5)6LW[W6S7NFJTW'85E]A
    5 MIU_U420/Y2;MYA8AIV!<LN-S$N*PJ]LWMBLB_N1#&,J`;]6)3DL</CZW^Z9B
    6 M"HIG0$H$.,AA>#FAF8D*`Q4$S4U4#BB,5YV9:.RBPD`A,M'$0,D"`$PT=5&K
    7 MJC#1S$"!5)4FFKNH534VT9F[KW3!B95#Y`KH6NS@2')T159\(-R=I@Y6B$!2
    8 MI`Y6E!"[NTX<A!4HD$2)@[!BA71T6ZF-E3!DYU66EQ4VY*.J,X96^#">_AE7
    9 MJP\$Z0/QG[75%H*TQ9C>\C]T25-WFC5-T=]]!5P)KB17,5<)5RE7&5<Y5S..
    10 MC8H7S@,"(/FQ2MZ?.]@"^!45@!)`#:`(4"50)2`XF1X:9SCQ_*;A&>\G/7\J
    11 MM9A"<.5KV3]>2HUOGO>P6^,9V=7?%2M8]E=$1L-!VI^3^P[_;'[A_0!&K+)*
    12 $?@4`````
     2M'XL("&RP05@``VYC:&EL8E]T97-T-"YR97,`A91+CYLP$,?O_A2CJ`?8.#2\
     3MLFTB.%0]9*4^#ENIAZI=D>`&2\:X]J1Y?/K:3I8L:=1R8%Z_^1LSF,<O[Q\^
     4M`4!<PH>'=S!"@Y'@J]&"/)XK20DV^<0EQR!<$&>A+$&N&RY63\@,9I%DN\A@
     5MA7U3ZN5&<KVTT)5@5H+F<@.ZF-)@3P_T&-):7>IY">YJNWHK&*BX^!;3/3TZ
     6MT-GO%W(V))-G<O^"N1\RZ4NU:[TW0S9S[&%`O!T2^;/:E5(\+:'WX\CW"&X0
     7M1%8X&ZB8JH2JE*J,JCR\-":G!4YO-Q`9O:>I+9./U9ZWE0#!Y`8;Z'["KM.U
     8M@0)20C[KE1W*N53`C)"OOE@SL]9<(>^DZ\"&@4?G0&*WRCZ(0V</9^OBNV.0
     9M],D^Z"OVEOH,(8)+5FDP!X.LG9.E$RD@P/!NZ;K&9S>]N+%S(2:^_F\TZ]'T
     10M?VC>H]D%S6^BLQ[-;Z+7+DR);RK^EKJQK5W#-`,?:Z8T,TRB\6_=,,V9@76G
     11M;59%@!UPJ;8(O&:5()6L@?^PLS/;MO6!]&VZ,6YNE03V2T;`#51KJU';TT.L
     12MA$?XID$K+.R(VTH-EG!U+_N[TKQ:"4:(.XY,X_F!YB3`=(S).`Y?!PGFDP2S
     13@B<TDF$Q2M%G2?Y?IZ2_@#OG6V!TN7I$_FZ[^KCL$````
    1314`
    1415end
  • Tst/Short/nchilb_test4.stat

    r174bcf r5d623c  
    1 1 >> tst_memory_0 :: 1476194900:4033, 64 bit:4.0.3:x86_64-Linux:topgun:504088
    2 1 >> tst_memory_1 :: 1476194900:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2228224
    3 1 >> tst_memory_2 :: 1476194900:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2236976
    4 1 >> tst_timer_1 :: 1476194900:4033, 64 bit:4.0.3:x86_64-Linux:topgun:8
     11 >> tst_memory_0 :: 1480700012:4100, 64 bit:4.1.0:x86_64-Linux:topgun:308648
     21 >> tst_memory_1 :: 1480700012:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2228224
     31 >> tst_memory_2 :: 1480700012:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2234896
     41 >> tst_timer_1 :: 1480700012:4100, 64 bit:4.1.0:x86_64-Linux:topgun:7
  • Tst/Short/nchilb_test4.tst

    r174bcf r5d623c  
    22tst_init();
    33LIB"ncHilb.lib";
     4ring r=0,(x,y,z),dp;
     5    module p1=[1,x,z,y,z,x,z];
     6    module p2=[1,x,z,x];
     7    module p3=[1,x,z,y,z,z,x,z];
     8    module p4=[1,y,z];
     9    module p5=[1,x,z,z,x,z];
    410
    5   ring r=0,U(1..3),dp;
    6   module p1=[1,U(2),U(3),U(3)];
    7   module p2=[1,U(2),U(2),U(3)];
    8   module p3=[1,U(1),U(3),U(3)];
    9   module p4=[1,U(1),U(3),U(2)];
    10   module p5=[1,U(1),U(2),U(3)];
    11   module p6=[1,U(1),U(2),U(2)];
    12   module p7=[1,U(1),U(1),U(3)];
    13   module p8=[1,U(1),U(1),U(2)];
    14   module p9=[1,U(2),U(3),U(2),U(3)];
    15   module p10=[1,U(2),U(3),U(1),U(3)];
    16   module p11=[1,U(2),U(3),U(1),U(2)];
    17   module p12=[1,U(1),U(3),U(1),U(3)];
    18   module p13=[1,U(1),U(3),U(1),U(2)];
    19   module p14=[1,U(1),U(2),U(1),U(3)];
    20   module p15=[1,U(1),U(2),U(1),U(2)];
    21   module p16=[1,U(2),U(3),U(2),U(1),U(3)];
    22   module p17=[1,U(2),U(3),U(2),U(1),U(2)];
    23   module p18=[1,U(2),U(3),U(2),U(2),U(1),U(3)];
    24   module p19=[1,U(2),U(3),U(2),U(2),U(1),U(2)];
    25   module p20=[1,U(2),U(3),U(2),U(2),U(2),U(1),U(3)];
    26   module p21=[1,U(2),U(3),U(2),U(2),U(2),U(1),U(2)];
    27   list ll=list(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,
    28   p14,p15,p16,p17,p18,p19,p20,p21);
    29   nchilb(ll,7,1);
     11    list l4=list(p1,p2,p3,p4,p5);
     12    nchilb(l4,7,3);
    3013tst_status(1);$
  • Tst/Short/nchilb_test5.res.gz.uu

    r174bcf r5d623c  
    11begin 664 nchilb_test5.res.gz
    2 M'XL("$KR_%<``VYC:&EL8E]T97-T-2YR97,`79&Q3L,P$(9W/\4I8G!4)]1.
    3 MTH*B9$`,5$(PM!M"%6DCL&2,%5]%FJ?'AK8Q6?Q+]W_^AKOUYG[U!`"\AL?5
    4 M'41H,56RB4JR/C6B!C?<2BV1QB7Q"74->O<A5;/%UF*1ZO8[M?B&ET_9KR[2
    5 MNP<'381Y[9Y.ZG?HJCFC/3NR(69[,Q*%)SZ_]@?5@N'5"V<]&SSF\W7D%B$G
    6 MSEP?$,N0R$+3U'43DKDGC__ZV[`OSJ:)A<\]I:1%4+SR20UG1C"3,9,S4\0C
    7 MRCWZMT6J.%NZBE#,9BAF/+ZF`HM$8)ZXB4"19.BFA#QWC5N_E4,+%2PNKM.-
    8 1_`D.EO*XO"(_543@6=D!````
     2M'XL("'2P05@``VYC:&EL8E]T97-T-2YR97,`C95-:QLQ$(;O^A5#Z&%MJZY'
     3MV@\[QGLH/230M(<4>B@E.+8:"S9KL5*(G5]?:;^E4K<&(XWTO.^(F=W5_;=/
     4MMU\``'/X?/L1KHPV\T(^7JW)?;O#<K"+#[*4)IJLB1LASZ'<'63Q^&"$-LF\
     5M%*]S;;:F%_':[JK<W5@H,(QS@$J63U!M%C0ZT3-]F]"]&H`DAWZ>SL']GH_[
     6MET*`PLT/=`+Z]G/@L]QC6,.</6;I,]PQI\!GY3-QQYP'!A<^DS2,EPO19]*.
     7M&?LPG\D:YN3Y<)]9=LS8)_:955<?_T2)3^&BP_R$:8#A@(US!O5&UA7*=PM*
     8MCGS`QFY!U3'NRN6YL:#PF`S8R(T%M<=T*(CO%S0`LS$X=@RZ@,L!##V#9N#*
     9M1\>N04?88HR&OD%?&(;PV#D;WAZV;-Z>0FH#1;)Q8Z20*D85IRJF*J$JI2JC
     10M:DG5BMH'P_[M/EH`.>U]5HV/;8Y=MQJT(K0JM#*T.F9U#"?](7C;K>8C$14)
     11MS2A21KE%R-WV))^W!12B?#('./Z"UV.UU[`!3LC7ZM%^7]JM#62$?*\W]T+O
     12M*JF,/)9.80X":O0:"+I,IP@G;CRWHXNGIXCUB]/S.'AK@QZSV[Q>(:20I=A6
     13MH,_:B.=K<N,<-Q`9.TZF-TXX<Q&K(]Y&O([018"DID::V-/$GB;N-?Q"GL33
     14MI+TFOI`G\S19KTG^.\^@22_D2?^BR3Q-]L^S+<CK050"ZCI60E5"B]+HNME:
     15M5%)HV!TKNZKF8(X@2_5B0.[%MB#$W3.B,BUW3:+W+N_4I>MFW,U8.\/)AZ@G
     16ENLT_!#,W&U0S-YNU>M(_[-C<D.X"?-%6L'Y'?@-#URPL5P<`````
    917`
    1018end
  • Tst/Short/nchilb_test5.stat

    r174bcf r5d623c  
    1 1 >> tst_memory_0 :: 1476194890:4033, 64 bit:4.0.3:x86_64-Linux:topgun:317832
    2 1 >> tst_memory_1 :: 1476194890:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2228224
    3 1 >> tst_memory_2 :: 1476194890:4033, 64 bit:4.0.3:x86_64-Linux:topgun:2234608
    4 1 >> tst_timer_1 :: 1476194890:4033, 64 bit:4.0.3:x86_64-Linux:topgun:7
     11 >> tst_memory_0 :: 1480700020:4100, 64 bit:4.1.0:x86_64-Linux:topgun:318328
     21 >> tst_memory_1 :: 1480700020:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2228224
     31 >> tst_memory_2 :: 1480700020:4100, 64 bit:4.1.0:x86_64-Linux:topgun:2237264
     41 >> tst_timer_1 :: 1480700020:4100, 64 bit:4.1.0:x86_64-Linux:topgun:8
  • Tst/Short/nchilb_test5.tst

    r174bcf r5d623c  
    22tst_init();
    33LIB"ncHilb.lib";
    4   ring r=0,(x,y,z),dp;
    5   module p1=[1,x,z,y,z,x,z];
    6   module p2=[1,x,z,x];
    7   module p3=[1,x,z,y,z,z,x,z];
    8   module p4=[1,y,z];
    9   module p5=[1,x,z,z,x,z];
    10   list l1=list(p1,p2,p3,p4,p5);
    11   nchilb(l1,7);
     4 ring r=0,(x,y,z),dp;
     5
     6    module p1=[1,y,z,z];
     7    module p2=[1,y,y,z];
     8    module p3=[1,x,z,z];
     9    module p4=[1,x,z,y];
     10    module p5=[1,x,y,z];
     11    module p6=[1,x,y,y];
     12    module p7=[1,x,x,z];
     13    module p8=[1,x,x,y];
     14    module p9=[1,y,z,y,z];
     15    module p10=[1,y,z,x,z];
     16    module p11=[1,y,z,x,y];
     17    module p12=[1,x,z,x,z];
     18    module p13=[1,x,z,x,y];
     19    module p14=[1,x,y,x,z];
     20    module p15=[1,x,y,x,y];
     21    module p16=[1,y,z,y,x,z];
     22    module p17=[1,y,z,y,x,y];
     23    module p18=[1,y,z,y,y,x,z];
     24    module p19=[1,y,z,y,y,x,y];
     25    module p20=[1,y,z,y,y,y,x,z];
     26    module p21=[1,y,z,y,y,y,x,y];
     27
     28    list l5=list(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,
     29    p14,p15,p16,p17,p18,p19,p20,p21);
     30    nchilb(l5,7,1,2,3);
    1231tst_status(1);$
  • kernel/combinatorics/hilb.cc

    r174bcf r5d623c  
    3737#include <coeffs/numbers.h>
    3838#include <vector>
     39#include <Singular/ipshell.h>
    3940
    4041#endif
     
    16851686      if(p_LmDivisibleBy(I->m[i], I->m[k], currRing))
    16861687      {
    1687         pDelete(&(I->m[k]));//this is not req.
     1688        pDelete(&(I->m[k]));
    16881689        break;
    16891690      }
     
    18561857}
    18571858
    1858 
    1859 void HilbertSeries_OrbitData(ideal S, int lV, bool IG_CASE )
     1859void HilbertSeries_OrbitData(ideal S, int lV, bool IG_CASE, bool mgrad, bool odp)
    18601860{
    18611861  /*
     
    18751875  if(IG_CASE)
    18761876  {
     1877    if(idIs0(S))
     1878    {
     1879      WerrorS("wrong input:not the infinitely gen. case");
     1880        return;
     1881    }
    18771882    trInd = p_Totaldegree(S->m[IDELEMS(S)-1], currRing);
    18781883    POS = &positionInOrbit_IG_Case;
     
    18911896  polist.push_back( p_One(currRing));
    18921897
    1893   std::vector< std::vector<int> > mat;
    1894   std::vector<int> row;
    1895   row.push_back(0);
    1896 
     1898  std::vector< std::vector<int> > posMat;
     1899  std::vector<int> posRow(lV,0);         
    18971900  std::vector<int> C;
    18981901
    1899   int ds, is, ps, sz;
     1902  int ds, is, ps;
    19001903  int lpcnt = 0;
    19011904
     
    19431946      Jwi = colonIdeal(S, wi, lV, Jwi);
    19441947      ps = (*POS)(Jwi, wi, idorb, polist, trInd);
    1945 
    1946       if(ps == 0)  // found new colon ideal
     1948     
     1949      if(ps == 0)  // finds a new ideal
    19471950      {
     1951        posRow[is-1] = idorb.size();
    19481952
    19491953        idorb.push_back(Jwi);
    19501954        polist.push_back(wi);
    1951         row.push_back(1);
    19521955      }
    1953       else // there is a same ideal in the orbit
     1956      else // ideal is already there in the orbit
    19541957      {
    1955         row[ps-1] = row[ps-1] + 1;
     1958        posRow[is-1]=ps-1;     
    19561959        idDelete(&Jwi);
    19571960        pDelete(&wi);
    19581961      }
    19591962    }
    1960     mat.push_back(row);
    1961     sz = row.size();
    1962     row.clear();
    1963     row.resize(sz, 0);
     1963    posMat.push_back(posRow);
     1964    posRow.resize(lV,0); 
     1965  }
     1966  int lO = C.size();//size of the orbit
     1967  PrintLn();
     1968  Print("Maximal length of words = %ld\n", p_Totaldegree(polist[lO-1], currRing));
     1969  Print("\nOrbit length = %d\n", lO);
     1970  PrintLn();
     1971 
     1972  if(odp)
     1973  {
     1974    Print("Words description of the Orbit: \n");
     1975    for(is = 0; is < lO; is++)
     1976    {
     1977      pWrite0(polist[is]);
     1978      PrintS("    ");
     1979    }
     1980    PrintLn();
    19641981  }
    19651982
     
    19751992  idorb.resize(0);
    19761993  polist.resize(0);
    1977 
    1978   row.resize(0);
    1979 
     1994 
     1995  int adjMatrix[lO][lO];
     1996  memset(adjMatrix, 0, lO*lO*sizeof(int));
    19801997  int rowCount, colCount;
    1981 #if 0
    1982   for(rowCount = 0; rowCount < mat.size(); rowCount++)
    1983   {
    1984     for(colCount = 0; colCount  < mat[rowCount].size(); colCount++)
    1985     {
    1986       Print("%d,",mat[rowCount][colCount]);
    1987     }
    1988     PrintLn();
    1989   }
    1990   printf("rhs column matrix::\n");
    1991   for(colCount = 0; colCount < C.size(); colCount++)
    1992   printf("%d,",C[colCount]);
    1993   //printf("\nlength of the Orbit==%ld\n", C.size());
    1994 #endif
     1998  int tm = 0;
     1999  if(!mgrad)
     2000  {
     2001    for(rowCount = 0; rowCount < lO; rowCount++)
     2002    {
     2003      for(colCount = 0; colCount < lV; colCount++)
     2004      {
     2005        tm = posMat[rowCount][colCount];
     2006        adjMatrix[rowCount][tm] = adjMatrix[rowCount][tm] + 1;
     2007      }
     2008    }
     2009  }
     2010 
    19952011  ring r = currRing;
    1996   char** tt=(char**)omalloc(sizeof(char*));
    1997   tt[0] = omStrDup("t");
     2012  int npar;
     2013  char** tt;
    19982014  TransExtInfo p;
    1999   p.r = rDefault(0, 1, tt);
    2000   coeffs cf = nInitChar(n_transExt,&p);
    2001 
     2015  if(!mgrad)
     2016  {
     2017    tt=(char**)omalloc(sizeof(char*));
     2018    tt[0] = omStrDup("t");
     2019    npar = 1;
     2020  }
     2021  else
     2022  {
     2023    tt=(char**)omalloc(lV*sizeof(char*));
     2024    for(is = 0; is < lV; is++)
     2025    {
     2026      tt[is] = (char*)omalloc(7*sizeof(char)); //if required enlarge it later
     2027      sprintf (tt[is], "t(%d)", is+1);
     2028    }
     2029    npar = lV;
     2030  }
     2031
     2032  p.r = rDefault(0, npar, tt);
     2033  coeffs cf = nInitChar(n_transExt, &p);
    20022034  char** xx = (char**)omalloc(sizeof(char*));
    20032035  xx[0] = omStrDup("x");
    20042036  ring R = rDefault(cf, 1, xx);
    2005   rChangeCurrRing(R);
     2037  rChangeCurrRing(R);//rWrite(R);
    20062038  /*
    20072039   * matrix corresponding to the orbit of the ideal
    20082040   */
    2009   int lO = C.size();//size of the orbit
    20102041  matrix mR = mpNew(lO, lO);
    20112042  matrix cMat = mpNew(lO,1);
     2043  poly rc;
     2044 
     2045  if(!mgrad)
     2046  {
     2047    for(rowCount = 0; rowCount < lO; rowCount++)
     2048    {
     2049      for(colCount = 0; colCount < lO; colCount++)
     2050      {
     2051        if(adjMatrix[rowCount][colCount] != 0)
     2052        {
     2053          MATELEM(mR, rowCount + 1, colCount + 1) = p_ISet(adjMatrix[rowCount][colCount], R);
     2054          p_SetCoeff(MATELEM(mR, rowCount + 1, colCount + 1), n_Mult(pGetCoeff(mR->m[lO*rowCount+colCount]),n_Param(1, R->cf), R->cf), R);
     2055        }
     2056      }
     2057    }
     2058  }
     2059  else
     2060  {
     2061     for(rowCount = 0; rowCount < lO; rowCount++)
     2062     {
     2063       for(colCount = 0; colCount < lV; colCount++)
     2064       {
     2065          rc=NULL;
     2066          rc=p_One(R);
     2067          p_SetCoeff(rc, n_Mult(pGetCoeff(rc), n_Param(colCount+1, R->cf),R->cf), R);
     2068          MATELEM(mR, rowCount +1, posMat[rowCount][colCount]+1)=p_Add_q(rc,MATELEM(mR, rowCount +1, posMat[rowCount][colCount]+1), R);
     2069       }
     2070     }
     2071  }
    20122072
    20132073  for(rowCount = 0; rowCount < lO; rowCount++)
    20142074  {
    2015     for(colCount = 0; colCount < mat[rowCount].size(); colCount++)
    2016     {
    2017       if(mat[rowCount][colCount] != 0)
     2075    if(C[rowCount] != 0)
     2076    {
     2077      MATELEM(cMat, rowCount + 1, 1) = p_ISet(C[rowCount], R);
     2078    }
     2079  }
     2080 
     2081  matrix u;
     2082  unitMatrix(lO, u); //unit matrix
     2083  matrix gMat = mp_Sub(u, mR, R);
     2084  char* s;
     2085  if(odp)
     2086  {
     2087    PrintS("\nlinear system:\n");
     2088    if(!mgrad)
     2089    {
     2090      for(rowCount = 0; rowCount < lO; rowCount++)
    20182091      {
    2019        MATELEM(mR, rowCount + 1, colCount + 1) = p_ISet(mat[rowCount][colCount], R);
    2020         p_SetCoeff(MATELEM(mR, rowCount + 1, colCount + 1), n_Mult(pGetCoeff(mR->m[lO*rowCount+colCount]),n_Param(1, R->cf), R->cf), R);
     2092        Print("H(%d) = ", rowCount+1);
     2093        for(colCount = 0; colCount < lV; colCount++)
     2094        {   
     2095          StringSetS(""); nWrite(n_Param(1, R->cf));
     2096          s = StringEndS(); PrintS(s);
     2097          Print("*"); omFree(s);
     2098          Print("H(%d) + ", posMat[rowCount][colCount] + 1);
     2099        }
     2100        Print(" %d\n", C[rowCount] );
    20212101      }
    2022     }
    2023     if(C[rowCount] != 0)
    2024     {
    2025       cMat->m[rowCount] = p_ISet(C[rowCount], R);
    2026     }
    2027     mat[rowCount].resize(0);
    2028   }
    2029   mat.resize(0);
     2102      PrintS("where H(1) represents the series corresp. to input ideal\n");
     2103      PrintS("and i^th summand in the rhs of an eqn. is according\n");
     2104      PrintS("to the right colon map corresp. to the i^th variable\n");
     2105    }
     2106    else
     2107    {
     2108      for(rowCount = 0; rowCount < lO; rowCount++)
     2109      {
     2110        Print("H(%d) = ", rowCount+1);
     2111        for(colCount = 0; colCount < lV; colCount++)
     2112        {
     2113           StringSetS(""); nWrite(n_Param(colCount+1, R->cf));
     2114           s = StringEndS(); PrintS(s);
     2115           Print("*");omFree(s);
     2116           Print("H(%d) + ", posMat[rowCount][colCount] + 1);
     2117        }
     2118        Print(" %d\n", C[rowCount] );
     2119      }
     2120      PrintS("where H(1) represents the series corresp. to input ideal\n");
     2121    }
     2122  }
     2123  posMat.resize(0);
    20302124  C.resize(0);
    2031   matrix u;
    2032   unitMatrix(lO,u); //unit matrix
    2033   matrix gMat=mp_Sub(u,mR,R);
    20342125  matrix pMat;
    20352126  matrix lMat;
     
    20402131  luSolveViaLUDecomp(pMat, lMat, uMat, cMat, H_serVec, Hnot);
    20412132
    2042   mp_Delete(&mR,R);
    2043   mp_Delete(&u,R);
    2044   mp_Delete(&pMat,R);
    2045   mp_Delete(&lMat,R);
    2046   mp_Delete(&uMat,R);
    2047   mp_Delete(&cMat,R);
    2048   mp_Delete(&gMat,R);
    2049   mp_Delete(&Hnot,R);
     2133  mp_Delete(&mR, R);
     2134  mp_Delete(&u, R);
     2135  mp_Delete(&pMat, R);
     2136  mp_Delete(&lMat, R);
     2137  mp_Delete(&uMat, R);
     2138  mp_Delete(&cMat, R);
     2139  mp_Delete(&gMat, R);
     2140  mp_Delete(&Hnot, R);
    20502141  //print the Hilbert series and Orbit length
    20512142  PrintLn();
     2143  Print("Hilbert series:");
     2144  PrintLn();
    20522145  pWrite(H_serVec->m[0]);
    2053   Print("\nOrbit size = %d\n", lO);
    2054 
    2055   omFree(tt[0]);
     2146  PrintLn();
     2147  if(!mgrad)
     2148  {
     2149    omFree(tt[0]);
     2150  }
     2151  else
     2152  {
     2153    for(is = lV-1; is >= 0; is--)
     2154
     2155      omFree( tt[is]);
     2156  }
    20562157  omFree(tt);
    20572158  omFree(xx[0]);
    20582159  omFree(xx);
    20592160  rChangeCurrRing(r);
    2060   rDelete(R);
    2061 }
    2062 
    2063 
     2161  rKill(R);
     2162}
  • kernel/combinatorics/hutil.h

    r174bcf r5d623c  
    8484scfmon hInit(ideal S, ideal Q, int * Nexist, ring tailRing);
    8585void slicehilb(ideal I);
    86 void HilbertSeries_OrbitData(ideal S, int lV, bool ig);
     86void HilbertSeries_OrbitData(ideal S, int lV, bool ig, bool mgrad, bool odp);
    8787#endif
Note: See TracChangeset for help on using the changeset viewer.