Changeset 16c769 in git for kernel/fglmzero.cc


Ignore:
Timestamp:
Jun 23, 2004, 5:12:24 PM (20 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
7a7952db978cc749fc63ac71b9eeab35dcba28ac
Parents:
cb2544e8c6fd4afb29e2f8c56b0717fb411424fb
Message:
*wichmann: finduni


git-svn-id: file:///usr/local/Singular/svn/trunk@7237 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/fglmzero.cc

    rcb2544e r16c769  
    11// emacs edit mode for this file is -*- C++ -*-
    2 // $Id: fglmzero.cc,v 1.1.1.1 2003-10-06 12:15:53 Singular Exp $
     2// $Id: fglmzero.cc,v 1.2 2004-06-23 15:12:24 Singular Exp $
    33
    44/****************************************
     
    7777    ~idealFunctionals();
    7878
    79     int dimen() const { fglmASSERT( _size>0, "called to early"); return _size; }
     79    int dimen() const { fglmASSERT( _size>0, "called too early"); return _size; }
    8080    void endofConstruction();
    8181    void map( ring source );
     
    9595    _nfunc= numFuncs;
    9696
    97     currentSize= (int *)omAlloc( _nfunc*sizeof( int ) );
    98     for ( k= _nfunc-1; k >= 0; k-- )
    99         currentSize[k]= 0;
     97    currentSize= (int *)omAlloc0( _nfunc*sizeof( int ) );
     98    //for ( k= _nfunc-1; k >= 0; k-- )
     99    //    currentSize[k]= 0;
    100100
    101101    func= (matHeader **)omAlloc( _nfunc*sizeof( matHeader * ) );
     
    488488        }
    489489        if ( done == FALSE ) {
    490             nlist.append( fglmSelem( newmonom, k ) );
     490            nlist.append( fglmSelem( newmonom, varpermutation[k] ) );
    491491            break;
    492492        }
    493493        if ( state == 0 ) {
    494             list.getItem().newDivisor( k );
     494            list.getItem().newDivisor( varpermutation[k] );
    495495            pDeleteLm(&newmonom);
    496496        }
    497497        else {
    498             list.insert( fglmSelem( newmonom, k ) );
     498            list.insert( fglmSelem( newmonom, varpermutation[k] ) );
    499499        }
    500500        k--;
     
    504504        pIncrExp( newmonom, varpermutation[k] );
    505505        pSetm( newmonom );
    506         nlist.append( fglmSelem( newmonom, k ) );
     506        nlist.append( fglmSelem( newmonom, varpermutation[k] ) );
    507507    }
    508508}
     
    10981098    int i;
    10991099    BOOLEAN isZero;
     1100    int *varpermutation = (int*)omAlloc( (pVariables+1)*sizeof(int) );
     1101    ideal perm = idMaxIdeal(1);
     1102    intvec *iv = idSort(perm,TRUE);
     1103    idDelete(&perm);
     1104    for(int i = pVariables; i > 0; i--) varpermutation[pVariables+1-i] = (*iv)[i-1];
     1105    delete iv;
     1106     
    11001107    for ( i= 1; i <= pVariables; i++ ) {
    11011108        // main loop
    1102         STICKYPROT2( "(%i)", i );
     1109        STICKYPROT2( "(%i)", i /*varpermutation[i]*/);
    11031110        gaussReducer gauss( l.dimen() );
    11041111        isZero= FALSE;
     
    11281135                        }
    11291136                        pSetCoeff( temp, n );
    1130                         pSetExp( temp, i, k-1 );
     1137                        pSetExp( temp, i /*varpermutation[i]*/, k-1 );
    11311138                        pSetm( temp );
    11321139                    }
     
    11381145                STICKYPROT( "." );
    11391146                gauss.store();
    1140                 v= l.multiply( v, i );
     1147                v= l.multiply( v, i /*varpermutation[i]*/ );
    11411148            }
    11421149        }
    11431150    }
    11441151    STICKYPROT( "\n" );
     1152    omFreeSize( (ADDRESS)varpermutation, (pVariables+1)*sizeof(int) );
    11451153    return destIdeal;
    11461154}
Note: See TracChangeset for help on using the changeset viewer.