Changeset 711e26 in git


Ignore:
Timestamp:
Aug 3, 2011, 7:49:45 PM (13 years ago)
Author:
Burcin Erocal <burcin@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
1187538f48f52e8f271d5b5d0ef0c4c672292679
Parents:
1e872a8ed7451934142b28236ec124f6235b5679
git-author:
Burcin Erocal <burcin@erocal.org>2011-08-03 19:49:45+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 13:14:22+01:00
Message:
Fix Singular/fglm.cc.
Location:
Singular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Singular/fehelp.h

    r1e872a r711e26  
    22#define FEHELP_H
    33
     4void feHelp(char* str = NULL);
    45const char* feHelpBrowser(char* which=NULL, int warn=-1);
    56
  • Singular/fglm.cc

    r1e872a r711e26  
    154154    else
    155155        pperm= NULL;
    156     maFindPerm( sring->names, nvar, sring->parameter, npar,
    157                 dring->names, nvar, dring->parameter, npar, vperm, pperm,
    158                 dring->ch);
     156    maFindPerm( sring->names, nvar, rParameter(sring), npar,
     157                dring->names, nvar, rParameter(dring), npar, vperm, pperm,
     158                dring->cf->type);
    159159    for ( k= nvar; (k > 0) && (state == FglmOk); k-- )
    160160        if ( vperm[k] <= 0 )
     
    183183        // check if sring->qideal is contained in dring->qideal:
    184184        rSetHdl( dringHdl );
    185         nMapFunc nMap=nSetMap( sring );
     185        nMapFunc nMap=n_SetMap(currRing->cf, sring->cf );
    186186        ideal sqind = idInit( IDELEMS( sring->qideal ), 1 );
    187187        for ( k= IDELEMS( sring->qideal )-1; k >= 0; k-- )
    188           (sqind->m)[k]= pPermPoly( (sring->qideal->m)[k], vperm, sring, nMap);
     188          (sqind->m)[k]= p_PermPoly( (sring->qideal->m)[k], vperm, sring,
     189                          currRing, nMap);
    189190        ideal sqindred = kNF( dring->qideal, NULL, sqind );
    190191        if ( ! idIs0( sqindred ) )
     
    200201        int * dsvperm = (int *)omAlloc0( (nvar+1)*sizeof( int ) );
    201202        maFindPerm( dring->names, nvar, NULL, 0, sring->names, nvar, NULL, 0,
    202                     dsvperm, NULL, sring->ch);
    203         nMap=nSetMap(dring);
     203                    dsvperm, NULL, sring->cf->type);
     204        nMap=n_SetMap(currRing->cf, dring->cf);
    204205        ideal dqins = idInit( IDELEMS( dring->qideal ), 1 );
    205206        for ( k= IDELEMS( dring->qideal )-1; k >= 0; k-- )
    206           (dqins->m)[k]=pPermPoly( (dring->qideal->m)[k], dsvperm, sring, nMap);
     207          (dqins->m)[k]=p_PermPoly( (dring->qideal->m)[k], dsvperm, sring,
     208                         currRing, nMap);
    207209        ideal dqinsred = kNF( sring->qideal, NULL, dqins );
    208210        if ( ! idIs0( dqinsred ) )
     
    241243    int power;
    242244    int k;
    243     BOOLEAN * purePowers = (BOOLEAN *)omAlloc0( pVariables*sizeof( BOOLEAN ) );
     245    BOOLEAN * purePowers = (BOOLEAN *)omAlloc0( currRing->N*sizeof( BOOLEAN ) );
    244246
    245247    for ( k= IDELEMS( theIdeal ) - 1; (state == FglmOk) && (k >= 0); k-- )
     
    251253          else if ( (power= pIsPurePower( p )) > 0 )
    252254          {
    253             fglmASSERT( 0 < power && power <= pVariables, "illegal power" );
     255            fglmASSERT( 0 < power && power <= currRing->N, "illegal power" );
    254256            if ( purePowers[power-1] == TRUE  ) state= FglmNotReduced;
    255257            else purePowers[power-1]= TRUE;
     
    262264    if ( state == FglmOk )
    263265    {
    264         for ( k= pVariables-1 ; (state == FglmOk) && (k >= 0); k-- )
     266        for ( k= currRing->N-1 ; (state == FglmOk) && (k >= 0); k-- )
    265267            if ( purePowers[k] == FALSE ) state= FglmNotZeroDim;
    266268    }
    267     omFreeSize( (ADDRESS)purePowers, pVariables*sizeof( BOOLEAN ) );
     269    omFreeSize( (ADDRESS)purePowers, currRing->N*sizeof( BOOLEAN ) );
    268270    return state;
    269271}
     
    284286    ring sourceRing = currRing;
    285287
    286     int * vperm = (int *)omAlloc0( (pVariables+1)*sizeof( int ) );
     288    int * vperm = (int *)omAlloc0( (currRing->N+1)*sizeof( int ) );
    287289    state= fglmConsistency( sourceRingHdl, destRingHdl, vperm );
    288     omFreeSize( (ADDRESS)vperm, (pVariables+1)*sizeof(int) );
     290    omFreeSize( (ADDRESS)vperm, (currRing->N+1)*sizeof(int) );
    289291
    290292    if ( state == FglmOk )
     
    434436      int i,k;
    435437      int count=0;
    436       BOOLEAN * purePowers = (BOOLEAN *)omAlloc0( pVariables*sizeof( BOOLEAN ) );
     438      BOOLEAN * purePowers = (BOOLEAN *)omAlloc0( currRing->N*sizeof( BOOLEAN ) );
    437439      for ( k= IDELEMS( sourceIdeal ) - 1; k >= 0; k-- )
    438440      {
     
    443445            purePowers[i-1]=k;
    444446            count++;
    445             if (count==pVariables) break;
     447            if (count==currRing->N) break;
    446448          }
    447449        }
    448450      }
    449       if (count==pVariables)
     451      if (count==currRing->N)
    450452      {
    451         destIdeal=idInit(pVariables,1);
    452         for(k=pVariables-1; k>=0; k--) destIdeal->m[k]=pCopy(sourceIdeal->m[purePowers[k]]);
     453        destIdeal=idInit(currRing->N,1);
     454        for(k=currRing->N-1; k>=0; k--) destIdeal->m[k]=pCopy(sourceIdeal->m[purePowers[k]]);
    453455      }
    454       omFreeSize((ADDRESS)purePowers, pVariables*sizeof( BOOLEAN ) );
     456      omFreeSize((ADDRESS)purePowers, currRing->N*sizeof( BOOLEAN ) );
    455457      if (destIdeal!=NULL)
    456458            state = FglmOk;
Note: See TracChangeset for help on using the changeset viewer.