Changeset 4b7db8 in git for Singular/ipshell.cc


Ignore:
Timestamp:
Oct 12, 2012, 12:44:08 PM (12 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
e2c21a2830ff139bc7175101732d2b833c240e49
Parents:
7ec05993a90b8b8d6cd1f03ce111460365a98194
Message:
fix: how to build ring from lists without order for components (rCompose)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/ipshell.cc

    r7ec0599 r4b7db8  
    21302130}
    21312131
    2132 ring rCompose(const lists  L)
     2132ring rCompose(const lists  L, const BOOLEAN check_comp)
    21332133{
    21342134  if ((L->nr!=3)
     
    22082208      if( R->cf == NULL )
    22092209      {
    2210         ring extRing = rCompose((lists)L->m[0].Data());
     2210        ring extRing = rCompose((lists)L->m[0].Data(),FALSE);
    22112211
    22122212        if (extRing==NULL)
     
    24492449        Werror("ordering incomplete: size (%d) should be %d",R->block1[j],R->N);
    24502450        goto rCompose_err;
     2451      }
     2452    }
     2453    if (check_comp)
     2454    {
     2455      BOOLEAN comp_order=FALSE;
     2456      int jj;
     2457      for(jj=0;jj<n;jj++)
     2458      {
     2459        if ((R->order[jj]==ringorder_c) ||
     2460            (R->order[jj]==ringorder_C)) { comp_order=TRUE; break; }
     2461      }
     2462      if (!comp_order)
     2463      {
     2464        R->order=(int*)omRealloc0Size(R->order,n*sizeof(int),(n+1)*sizeof(int));
     2465        R->block0=(int*)omRealloc0Size(R->block0,n*sizeof(int),(n+1)*sizeof(int));
     2466        R->block1=(int*)omRealloc0Size(R->block1,n*sizeof(int),(n+1)*sizeof(int));
     2467        R->wvhdl=(int**)omRealloc0Size(R->wvhdl,n*sizeof(int_ptr),(n+1)*sizeof(int_ptr));
     2468        R->order[n-1]=ringorder_C;
     2469        R->block0[n-1]=0;
     2470        R->block1[n-1]=0;
     2471        R->wvhdl[n-1]=NULL;
     2472        n++;
    24512473      }
    24522474    }
Note: See TracChangeset for help on using the changeset viewer.