Changeset f28c6c in git
- Timestamp:
- May 13, 2005, 5:29:19 PM (19 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- f5515b4f738f8cffd92efc95b23701e61b8982f4
- Parents:
- b6eb14fd348d7efc8e50676bd4a3f35a83516571
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rb6eb14 rf28c6c 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.36 0 2005-05-13 15:18:48Singular Exp $ */4 /* $Id: iparith.cc,v 1.361 2005-05-13 15:29:19 Singular Exp $ */ 5 5 6 6 /* … … 2258 2258 return FALSE; 2259 2259 } 2260 #if 0 2260 2261 static BOOLEAN jjRES(leftv res, leftv u, leftv v) 2261 2262 { … … 2362 2363 else 2363 2364 { 2364 #if 02365 //#if 0 2365 2366 // need to set weights for ALL components (sres) 2366 2367 if (weights!=NULL) … … 2370 2371 (r->weights)[0] = ivCopy(weights); 2371 2372 } 2373 //#endif 2374 } 2375 if (ww!=NULL) { delete ww; ww=NULL; } 2376 return FALSE; 2377 } 2378 #else 2379 static BOOLEAN jjRES(leftv res, leftv u, leftv v) 2380 { 2381 int maxl=(int)v->Data(); 2382 if (maxl<0) 2383 { 2384 WerrorS("length for res must not be negative"); 2385 return TRUE; 2386 } 2387 int l=0; 2388 //resolvente r; 2389 syStrategy r; 2390 intvec *weights=NULL; 2391 int wmaxl=maxl; 2392 ideal u_id=(ideal)u->Data(); 2393 2394 maxl--; 2395 if ((maxl==-1) /*&& (iiOp!=MRES_CMD)*/) 2396 { 2397 maxl = pVariables-1+2*(iiOp==MRES_CMD); 2398 if (currQuotient!=NULL) 2399 { 2400 Warn( 2401 "full resolution in a qring may be infinite, setting max length to %d", 2402 maxl+1); 2403 } 2404 } 2405 weights=(intvec*)atGet(u,"isHomog",INTVEC_CMD); 2406 if (weights!=NULL) 2407 { 2408 if (!idTestHomModule(u_id,currQuotient,weights)) 2409 { 2410 WarnS("wrong weights given:");weights->show();PrintLn(); 2411 weights=NULL; 2412 } 2413 } 2414 intvec *ww=NULL; 2415 int add_row_shift=0; 2416 if (weights!=NULL) 2417 { 2418 ww=ivCopy(weights); 2419 add_row_shift = ww->min_in(); 2420 (*ww) -= add_row_shift; 2421 } 2422 2423 if ((iiOp == RES_CMD) || (iiOp == MRES_CMD)) 2424 { 2425 r=syResolution(u_id,maxl, ww, iiOp==MRES_CMD); 2426 } 2427 else if (iiOp==SRES_CMD) 2428 // r=sySchreyerResolvente(u_id,maxl+1,&l); 2429 r=sySchreyer(u_id,maxl+1); 2430 else if (iiOp == LRES_CMD) 2431 { 2432 int dummy; 2433 if((currQuotient!=NULL)|| 2434 (!idHomIdeal (u_id,NULL))) 2435 { 2436 WerrorS 2437 ("`lres` not implemented for inhomogeneous input or qring"); 2438 return TRUE; 2439 } 2440 r=syLaScala3(u_id,&dummy); 2441 } 2442 else if (iiOp == KRES_CMD) 2443 { 2444 int dummy; 2445 if((currQuotient!=NULL)|| 2446 (!idHomIdeal (u_id,NULL))) 2447 { 2448 WerrorS 2449 ("`kres` not implemented for inhomogeneous input or qring"); 2450 return TRUE; 2451 } 2452 r=syKosz(u_id,&dummy); 2453 } 2454 else 2455 { 2456 int dummy; 2457 if((currQuotient!=NULL)|| 2458 (!idHomIdeal (u_id,NULL))) 2459 { 2460 WerrorS 2461 ("`hres` not implemented for inhomogeneous input or qring"); 2462 return TRUE; 2463 } 2464 r=syHilb(u_id,&dummy); 2465 } 2466 if (r==NULL) return TRUE; 2467 //res->data=(void *)liMakeResolv(r,l,wmaxl,u->Typ(),weights); 2468 r->list_length=wmaxl; 2469 res->data=(void *)r; 2470 if (ww!=NULL) { delete ww; ww=NULL; } 2471 if ((r->weights!=NULL) && (r->weights[0]!=NULL)) 2472 { 2473 ww=ivCopy(r->weights[0]); 2474 if (weights!=NULL) (*ww) += add_row_shift; 2475 atSet(res,omStrDup("isHomog"),ww,INTVEC_CMD); 2476 } 2477 else if (atGet(res,"isHomog",INTVEC_CMD)==NULL) 2478 { 2479 if (weights!=NULL) 2480 { 2481 atSet(res,omStrDup("isHomog"),ivCopy(weights),INTVEC_CMD); 2482 } 2483 } 2484 return FALSE; 2485 } 2372 2486 #endif 2373 }2374 if (ww!=NULL) { delete ww; ww=NULL; }2375 return FALSE;2376 }2377 2487 static BOOLEAN jjRSUM(leftv res, leftv u, leftv v) 2378 2488 {
Note: See TracChangeset
for help on using the changeset viewer.