Changeset 16c769 in git for kernel/fglmzero.cc
- Timestamp:
- Jun 23, 2004, 5:12:24 PM (20 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 7a7952db978cc749fc63ac71b9eeab35dcba28ac
- Parents:
- cb2544e8c6fd4afb29e2f8c56b0717fb411424fb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/fglmzero.cc
rcb2544e r16c769 1 1 // emacs edit mode for this file is -*- C++ -*- 2 // $Id: fglmzero.cc,v 1. 1.1.1 2003-10-06 12:15:53Singular Exp $2 // $Id: fglmzero.cc,v 1.2 2004-06-23 15:12:24 Singular Exp $ 3 3 4 4 /**************************************** … … 77 77 ~idealFunctionals(); 78 78 79 int dimen() const { fglmASSERT( _size>0, "called to early"); return _size; }79 int dimen() const { fglmASSERT( _size>0, "called too early"); return _size; } 80 80 void endofConstruction(); 81 81 void map( ring source ); … … 95 95 _nfunc= numFuncs; 96 96 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; 100 100 101 101 func= (matHeader **)omAlloc( _nfunc*sizeof( matHeader * ) ); … … 488 488 } 489 489 if ( done == FALSE ) { 490 nlist.append( fglmSelem( newmonom, k) );490 nlist.append( fglmSelem( newmonom, varpermutation[k] ) ); 491 491 break; 492 492 } 493 493 if ( state == 0 ) { 494 list.getItem().newDivisor( k);494 list.getItem().newDivisor( varpermutation[k] ); 495 495 pDeleteLm(&newmonom); 496 496 } 497 497 else { 498 list.insert( fglmSelem( newmonom, k) );498 list.insert( fglmSelem( newmonom, varpermutation[k] ) ); 499 499 } 500 500 k--; … … 504 504 pIncrExp( newmonom, varpermutation[k] ); 505 505 pSetm( newmonom ); 506 nlist.append( fglmSelem( newmonom, k) );506 nlist.append( fglmSelem( newmonom, varpermutation[k] ) ); 507 507 } 508 508 } … … 1098 1098 int i; 1099 1099 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 1100 1107 for ( i= 1; i <= pVariables; i++ ) { 1101 1108 // main loop 1102 STICKYPROT2( "(%i)", i );1109 STICKYPROT2( "(%i)", i /*varpermutation[i]*/); 1103 1110 gaussReducer gauss( l.dimen() ); 1104 1111 isZero= FALSE; … … 1128 1135 } 1129 1136 pSetCoeff( temp, n ); 1130 pSetExp( temp, i , k-1 );1137 pSetExp( temp, i /*varpermutation[i]*/, k-1 ); 1131 1138 pSetm( temp ); 1132 1139 } … … 1138 1145 STICKYPROT( "." ); 1139 1146 gauss.store(); 1140 v= l.multiply( v, i );1147 v= l.multiply( v, i /*varpermutation[i]*/ ); 1141 1148 } 1142 1149 } 1143 1150 } 1144 1151 STICKYPROT( "\n" ); 1152 omFreeSize( (ADDRESS)varpermutation, (pVariables+1)*sizeof(int) ); 1145 1153 return destIdeal; 1146 1154 }
Note: See TracChangeset
for help on using the changeset viewer.