Changeset f56364 in git
- Timestamp:
- May 14, 2004, 6:26:06 PM (20 years ago)
- Branches:
- (u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
- Children:
- eb3df5f6cd0d2f41b1e3e8e230de51ececf2fbc4
- Parents:
- 76147f6348840c94403be9dcadc71bbd7fa68271
- Location:
- kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/gring.cc
r76147f6 rf56364 7 7 * Author: levandov (Viktor Levandovsky) 8 8 * Created: 8/00 - 11/00 9 * Version: $Id: gring.cc,v 1. 9 2004-05-12 11:24:36levandov Exp $9 * Version: $Id: gring.cc,v 1.10 2004-05-14 16:26:05 levandov Exp $ 10 10 *******************************************************************/ 11 11 #include "mod2.h" … … 1302 1302 if (pres!=NULL) 1303 1303 { 1304 coef =nMult(pGetCoeff(p),pGetCoeff(Q));1305 pres =p_Mult_nn(pres,coef,currRing);1304 coef = nMult(pGetCoeff(p),pGetCoeff(Q)); 1305 pres = p_Mult_nn(pres,coef,currRing); 1306 1306 if (UseBuckets) sBucket_Add_p(bu_out,pres,pLength(pres)); 1307 1307 else res=p_Add_q(res,pres,currRing); … … 1427 1427 freeT(PREFIX, rN); 1428 1428 freeT(SUFFIX, rN); 1429 pTest(res); 1429 1430 return(res); 1430 1431 } -
kernel/maps.cc
r76147f6 rf56364 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: maps.cc,v 1. 2 2004-05-12 11:24:37levandov Exp $ */4 /* $Id: maps.cc,v 1.3 2004-05-14 16:26:05 levandov Exp $ */ 5 5 /* 6 6 * ABSTRACT - the mapping of polynomials to other rings … … 193 193 *returns the preimage of id under theMap, 194 194 *if id is empty or zero the kernel is computed 195 * (assumes) that both ring have the same coeff.field 195 196 */ 196 197 ideal maGetPreimage(ring theImageRing, map theMap, ideal id) … … 248 249 249 250 #ifdef HAVE_PLURAL 250 if ( sourcering->nc!= NULL)251 if (rIsPluralRing(theImageRing)) 251 252 { 252 253 rUnComplete(&tmpR); 253 omFreeSize(orders, sizeof(int)*(ordersize)); 254 omFreeSize(block0, sizeof(int)*(ordersize)); 255 omFreeSize(block1, sizeof(int)*(ordersize)); 256 omFreeSize(wv, sizeof(int*)*(ordersize)); 257 omFreeSize(names, (currRing->N)*sizeof(char*)); 258 if (sourcering->nc->type!=nc_comm) 254 omFreeSize(orders, sizeof(int)*(ordersize));orders=NULL; 255 omFreeSize(block0, sizeof(int)*(ordersize));block0=NULL; 256 omFreeSize(block1, sizeof(int)*(ordersize));block1=NULL; 257 omFreeSize(wv, sizeof(int*)*(ordersize)); wv=NULL; 258 omFreeSize(names, (currRing->N)*sizeof(char*)); names=NULL; 259 memset(&tmpR,0,sizeof(tmpR)); 260 if ((rIsPluralRing(sourcering)) && (sourcering->nc->type!=nc_comm)) 259 261 { 260 262 Werror("Sorry, not yet implemented for noncomm. rings"); 261 263 return NULL; 262 264 } 263 if ( rSum(theImageRing, sourcering, &tmpR ) !=1 ) 265 ring tmpR_ptr; 266 if ( rSum(theImageRing, sourcering, tmpR_ptr ) !=1 ) 264 267 { 265 268 /* something is wrong with the rings... */ … … 267 270 return NULL; 268 271 } 272 memcpy(&tmpR,tmpR_ptr,sizeof(tmpR)); 273 // Action! 274 } 275 if (nSetMap(theImageRing) != nCopy) 276 { 277 Werror("Coefficient fields must be equal"); 278 return NULL; 269 279 } 270 280 #endif … … 337 347 idSkipZeroes(temp1); 338 348 rUnComplete(&tmpR); 339 omFreeSize(orders, sizeof(int)*(ordersize)); 340 omFreeSize(block0, sizeof(int)*(ordersize)); 341 omFreeSize(block1, sizeof(int)*(ordersize)); 342 omFreeSize(wv, sizeof(int*)*(ordersize)); 343 omFreeSize(names, (currRing->N)*sizeof(char*)); 349 if (orders!=NULL) 350 { 351 omFreeSize(orders, sizeof(int)*(ordersize)); 352 omFreeSize(block0, sizeof(int)*(ordersize)); 353 omFreeSize(block1, sizeof(int)*(ordersize)); 354 omFreeSize(wv, sizeof(int*)*(ordersize)); 355 omFreeSize(names, (currRing->N)*sizeof(char*)); 356 } 344 357 return temp1; 345 358 } -
kernel/sbuckets.cc
r76147f6 rf56364 8 8 * Author: obachman (Olaf Bachmann) 9 9 * Created: 9/00 10 * Version: $Id: sbuckets.cc,v 1. 1.1.1 2003-10-06 12:16:02 SingularExp $10 * Version: $Id: sbuckets.cc,v 1.2 2004-05-14 16:26:06 levandov Exp $ 11 11 *******************************************************************/ 12 12 #include "mod2.h" … … 145 145 bucket->buckets[i].p = NULL; 146 146 bucket->buckets[i].length = 0; 147 if (p==NULL) 148 { 149 if (i > bucket->max_bucket) bucket->max_bucket = i; 150 return; 151 } 147 152 i = LOG2(length); 148 153 }
Note: See TracChangeset
for help on using the changeset viewer.