Changeset 22579cf in git for Singular


Ignore:
Timestamp:
Mar 15, 2011, 7:17:44 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38077648e7239f98078663eb941c3c979511150a')
Children:
273fed0aea0c3cb00dc08f02c5d5340a2a781f23
Parents:
91b031a4e88cb480f4ba993bf5904694c62d9b34
Message:
FIX: betti and convertion to list should not change a resolution (syzstr)!
FIX: La Scala must return min/full-res and should forget about syRing!
FIX: is syRing NOT needed after La Scala resolution is finished...
FIX: printing of resolution will not change the resolution anymore? (convetion to list?)

From: Oleksandr Motsak <motsak@mathematik.uni-kl.de>

git-svn-id: file:///usr/local/Singular/svn/trunk@13975 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r91b031 r22579cf  
    29832983    }
    29842984  }
     2985
     2986  // test the La Scala case' output
     2987  assume( (iiOp == LRES_CMD) == (r->syRing != NULL) );
     2988  assume( (iiOp == LRES_CMD) == (r->resPairs != NULL) );
     2989  assume( (r->minres != NULL) || (r->fullres != NULL) );
     2990
    29852991  return FALSE;
    29862992}
     
    41904196{
    41914197  intvec *weights=(intvec*)atGet(v,"isHomog",INTVEC_CMD);
    4192   res->data=(char *)syMinimize((syStrategy)v->Data());
     4198
     4199  syStrategy tmp=(syStrategy)v->Data();
     4200  tmp = syMinimize(tmp); // enrich itself!
     4201
     4202  res->data=(char *)tmp;
     4203 
    41934204  if (weights!=NULL)
    41944205    atSet(res, omStrDup("isHomog"),ivCopy(weights),INTVEC_CMD);
     4206
    41954207  return FALSE;
    41964208}
  • Singular/ipconv.cc

    r91b031 r22579cf  
    236236
    237237  syStrategy tmp=(syStrategy)in->CopyD();
     238
    238239  out->data=(void *)syConvRes(tmp,TRUE,add_row_shift);
    239240}
  • Singular/ipshell.cc

    r91b031 r22579cf  
    21102110      }
    21112111      R->order[j]=rOrderName(omStrDup((char*)vv->m[0].Data())); // assume STRING
     2112
    21122113      if (j==0) R->block0[0]=1;
    21132114      else
     
    25112512{
    25122513  syStrategy syzstr=(syStrategy)u->Data();
     2514
    25132515  BOOLEAN minim=(int)(long)w->Data();
    25142516  int row_shift=0;
     
    25222524     (*weights) -= add_row_shift;
    25232525  }
     2526 
    25242527  res->data=(void *)syBettiOfComputation(syzstr,minim,&row_shift,weights);
    25252528  //row_shift += add_row_shift;
    25262529  //Print("row_shift=%d, add_row_shift=%d\n",row_shift,add_row_shift);
    25272530  atSet(res,omStrDup("rowShift"),(void*)add_row_shift,INT_CMD);
     2531
    25282532  return FALSE;
    25292533}
     
    25422546lists syConvRes(syStrategy syzstr,BOOLEAN toDel,int add_row_shift)
    25432547{
    2544   if ((syzstr->fullres==NULL) && (syzstr->minres==NULL))
     2548  resolvente fullres = syzstr->fullres;
     2549  resolvente minres = syzstr->minres;
     2550
     2551  const int length = syzstr->length;
     2552
     2553  if ((fullres==NULL) && (minres==NULL))
    25452554  {
    25462555    if (syzstr->hilb_coeffs==NULL)
    25472556    {
    2548       syzstr->fullres = syReorder(syzstr->res,syzstr->length,syzstr);
     2557      fullres = syReorder(syzstr->res, length, syzstr);
    25492558    }
    25502559    else
    25512560    {
    2552       syzstr->minres = syReorder(syzstr->orderedRes,syzstr->length,syzstr);
    2553       syKillEmptyEntres(syzstr->minres,syzstr->length);
    2554     }
    2555   }
     2561      minres = syReorder(syzstr->orderedRes, length, syzstr);
     2562      syKillEmptyEntres(minres, length);
     2563    }
     2564  }
     2565
    25562566  resolvente tr;
    25572567  int typ0=IDEAL_CMD;
    2558   if (syzstr->minres!=NULL)
    2559     tr = syzstr->minres;
     2568
     2569  if (minres!=NULL)
     2570    tr = minres;
    25602571  else
    2561     tr = syzstr->fullres;
    2562   resolvente trueres=NULL;
    2563   intvec ** w=NULL;
    2564   if (syzstr->length>0)
    2565   {
    2566     trueres=(resolvente)omAlloc0((syzstr->length)*sizeof(ideal));
    2567     for (int i=(syzstr->length)-1;i>=0;i--)
     2572    tr = fullres;
     2573 
     2574  resolvente trueres=NULL; intvec ** w=NULL;
     2575
     2576  if (length>0)
     2577  {
     2578    trueres = (resolvente)omAlloc0((length)*sizeof(ideal));
     2579    for (int i=(length)-1;i>=0;i--)
    25682580    {
    25692581      if (tr[i]!=NULL)
     
    25762588    if (syzstr->weights!=NULL)
    25772589    {
    2578       w = (intvec**)omAlloc0((syzstr->length)*sizeof(intvec*));
    2579       for (int i=(syzstr->length)-1;i>=0;i--)
     2590      w = (intvec**)omAlloc0(length*sizeof(intvec*));
     2591      for (int i=length-1;i>=0;i--)
    25802592      {
    25812593        if (syzstr->weights[i]!=NULL) w[i] = ivCopy(syzstr->weights[i]);
     
    25832595    }
    25842596  }
    2585   lists li = liMakeResolv(trueres,syzstr->length,syzstr->list_length,typ0,
    2586                           w,add_row_shift);
    2587   if (w != NULL) omFreeSize(w, (syzstr->length)*sizeof(intvec*));
    2588   if (toDel) syKillComputation(syzstr);
     2597 
     2598  lists li = liMakeResolv(trueres, length, syzstr->list_length,typ0,
     2599                          w, add_row_shift);
     2600
     2601  if (w != NULL) omFreeSize(w, length*sizeof(intvec*));
     2602 
     2603  if (toDel)
     2604    syKillComputation(syzstr);
     2605  else
     2606  {
     2607    if( fullres != NULL && syzstr->fullres == NULL )
     2608      syzstr->fullres = fullres;
     2609
     2610    if( minres != NULL && syzstr->minres == NULL )
     2611      syzstr->minres = minres;
     2612  }
     2613 
    25892614  return li;
     2615
     2616 
    25902617}
    25912618
  • Singular/subexpr.cc

    r91b031 r22579cf  
    144144          break;
    145145        case RESOLUTION_CMD:
    146           syPrint((syStrategy)d);
     146        {
     147          syStrategy tmp=(syStrategy)d;
     148          syPrint(tmp);
    147149          break;
     150        }
    148151        case STRING_CMD:
    149152          PrintNSpaces(spaces);
Note: See TracChangeset for help on using the changeset viewer.