Changeset 10ea45f in git for kernel/ideals.cc
 Timestamp:
 Jan 10, 2007, 6:17:27 PM (16 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ba3e3ef698fa0b7c5867199959cc83330073d3cb')
 Children:
 fdd5604bedc8353dc8e4d0431a01159bbb48053b
 Parents:
 97208806ca1fe3113b822ea4faecba0684b69601
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/ideals.cc
r972088 r10ea45f 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ideals.cc,v 1.3 0 20070110 10:42:00Singular Exp $ */4 /* $Id: ideals.cc,v 1.31 20070110 17:17:27 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT  all basic methods to manipulate ideals … … 523 523 { 524 524 ideal result = idSimpleAdd(h1,h2); 525 ideal tmp = idCompactify(result); 526 527 idDelete(&result); 525 idCompactify(result); 528 526 return tmp; 529 527 } … … 567 565 } 568 566 { 569 ideal tmp = idCompactify(hh); 570 idDelete(&hh); 571 return tmp; 572 //return hh; 567 idCompactify(hh); 568 return hh; 573 569 } 574 570 } … … 2571 2567 *skips all zeroes and double elements, searches also for units 2572 2568 */ 2573 idealidCompactify(ideal id)2569 void idCompactify(ideal id) 2574 2570 { 2575 2571 int i,j; … … 2584 2580 if (b) 2585 2581 { 2586 ideal result=idInit(1,id>rank); 2587 result>m[0]=pOne(); 2588 return result; 2582 for(i=IDELEMS(id)1;i>=0;i) pDelete(&id>m[i]); 2583 id>m[0]=pOne(); 2589 2584 } 2590 2585 else 2591 2586 { 2592 ideal result=idCopy(id); 2593 //if (IDELEMS(result) < 1) 2594 { 2595 for (i=1;i<IDELEMS(result);i++) 2596 { 2597 if (result>m[i]!=NULL) 2598 { 2599 for (j=0;j<i;j++) 2600 { 2601 if ((result>m[j]!=NULL) 2602 && (pComparePolys(result>m[i],result>m[j]))) 2603 { 2604 pDelete(&(result>m[j])); 2605 } 2606 } 2607 } 2608 } 2609 } 2610 // else 2611 // { 2612 // intvec *v=idSort(result,TRUE); 2613 // for(i=0;i<IDELEMS(result);i++) 2614 // (*v)[i]; 2615 // for (i=0;i<IDELEMS(result)1;i++) 2616 // { 2617 // if (((*v)[i]>=0) 2618 // && (result>m[(*v)[i]]!=NULL)) 2619 // { 2620 // j=i+1; 2621 // while ((j<IDELEMS(result)) 2622 // && ((*v)[j]>=0) 2623 // && (result>m[(*v)[j]]!=NULL) 2624 // && (pComparePolys(result>m[(*v)[i]],result>m[(*v)[j]]))) 2625 // { 2626 // pDelete(&(result>m[(*v)[j]])); 2627 // j++; 2628 // } 2629 // } 2630 // } 2631 // delete v; 2632 // } 2633 idSkipZeroes(result); 2634 return result; 2587 idDelMultiples(id); 2588 idSkipZeroes(id); 2635 2589 } 2636 2590 }
Note: See TracChangeset
for help on using the changeset viewer.