Changeset e8c1286 in git


Ignore:
Timestamp:
Apr 24, 2019, 7:31:54 PM (4 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
220dc1a0cfcef407839d7120bc6f0962c40ae9c3
Parents:
4ed84fc76dd9f28f462bf81c365f44aba3caccf6
Message:
Fix lpGkDim
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/dyn_modules/freealgebra/freealgebra.cc

    r4ed84fc re8c1286  
    249249
    250250// -1 is infinity
    251 static int graphGrowth(intvec G)
     251static int graphGrowth(const intvec G)
    252252{
    253253  // init
     
    274274
    275275// -1 is infinity, -2 is error
    276 static int id_LPGkDim(ideal G)
     276static int id_LPGkDim(const ideal _G)
    277277{
    278278  if (rField_is_Ring(currRing)) {
     
    281281  }
    282282
    283   idSkipZeroes(G); // remove zeros
    284   for (int i=IDELEMS(G)-1;i>=0; i--)
    285   {
    286     G->m[i]->next = NULL; // G = LM(G)
    287     if (pGetComp(G->m[i]) != 0)
     283  for (int i=IDELEMS(_G)-1;i>=0; i--)
     284  {
     285    if (pGetComp(_G->m[i]) != 0)
    288286    {
    289287      WerrorS("GK-Dim not implemented for modules");
     
    291289    }
    292290  }
     291
     292  ideal G = id_Head(_G, currRing); // G = LM(G) (and copy)
     293  idSkipZeroes(G); // remove zeros
    293294  id_DelLmEquals(G, currRing); // remove duplicates
    294295
     
    330331  {
    331332    assumeStdFlag(h);
    332     ideal G=(ideal)h->Data();
     333    ideal G = (ideal) h->Data();
    333334    res->rtyp = INT_CMD;
    334335    res->data = (void*)(long) id_LPGkDim(G);
Note: See TracChangeset for help on using the changeset viewer.