Changeset 4c420e in git
- Timestamp:
- Dec 9, 2014, 10:57:33 PM (9 years ago)
- Branches:
- (u'spielwiese', 'd0474371d8c5d8068ab70bfb42719c97936b18a6')
- Children:
- a8af6f058ab28f330d2e439aaac812dbb2bc6af6
- Parents:
- 70eecb25f735a5ffd8523ba1253e0d8a08f8c1a9
- git-author:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-12-09 22:57:33+01:00
- git-committer:
- Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-12-09 23:35:30+01:00
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/schreyer.lib
r70eecb r4c420e 2166 2166 if( typeof(SR) != "SRES" ) 2167 2167 { 2168 list L = SR;2169 return ( L);2168 list @@@L = SR; 2169 return (@@@L); 2170 2170 } 2171 2171 … … 2177 2177 2178 2178 setring R; 2179 list L = SR.rsltn; 2179 2180 list @@@L = SR.rsltn; 2180 2181 setring save; 2181 return (imap( R, L ));2182 return (imap( R, @@@L )); 2182 2183 } 2183 2184 … … 2580 2581 print(betti(rs, 1)); //minimal betties 2581 2582 print(minres(rs)); 2582 } 2583 kill rs; 2584 2585 def rs = s_res_bm(M); 2586 print(rs); 2587 print(betti(rs, 0)); // non-minimal betties 2588 print(SRES_list(rs)); 2589 print(betti(rs, 1)); //minimal betties 2590 print(minres(rs)); 2591 2592 } 2593 2594 proc s_res_bm(def I) 2595 { 2596 int @prot = (find(option(),"prot") != 0) && (defined(NumberStatsInit)) && (defined(NumberStatsPrint)); 2597 def @save = basering; 2598 2599 int @RINGCHANGE = 0; 2600 2601 if( typeof( attrib(SSinit, "RINGCHANGE") ) == "int" ) 2602 { 2603 @RINGCHANGE = attrib(SSinit, "@RINGCHANGE"); 2604 } 2605 int t,tt,sum; 2606 sum = 0; 2607 2608 t=rtimer;def R=SSinit(I);tt=rtimer; 2609 2610 "%% Setup(SSinit) TIME:", tt - t; 2611 sum = sum + (tt-t); 2612 2613 if( @RINGCHANGE ){ setring R; } 2614 2615 int @l = size(RES); 2616 module N, L, T, LL, TT; 2617 L = LRES[@l]; 2618 T = TRES[@l]; 2619 2620 2621 int ss = attrib(basering, "SYZNUMBER"); 2622 2623 while ( 1 ) 2624 { 2625 if(@prot){ NumberStatsInit(); } 2626 2627 // SSstep(): 2628 t=rtimer;(N,LL,TT)=SSComputeSyzygy(L,T);tt=rtimer; 2629 2630 @l = @l + 1; 2631 if(@prot){ NumberStatsPrint("Number statistic for SSComputeSyzygy["+string(@l-2)+"]"); } 2632 "%% SSstep[",@l-2, "] TIME:", tt - t; 2633 sum = sum + (tt-t); 2634 2635 if( (size(LL) == 0) || (size(N) == 0) ) { break; } 2636 L = LL; T = TT; RES[@l] = N; // LRES[@l] = LL; TRES[@l] = TT; 2637 2638 ss = ss + 1; attrib(basering, "SYZNUMBER", ss ); 2639 } 2640 2641 "%% Whole Resolution (with "+string(@l)+"syzygies) TIME:", sum; 2642 resolution rsltn = list(RES[2..size(RES)]); 2643 2644 print(rsltn); 2645 "Non-minimal betties: "; 2646 print(betti(rsltn, 0), "betti"); 2647 "Minimal betties: "; 2648 print(betti(rsltn, 1), "betti"); 2649 2650 if( !@RINGCHANGE ) 2651 { 2652 return (rsltn); // ret 2653 } 2654 2655 SRES ret; ret.r = R; ret.rsltn = rsltn; 2656 return (ret); 2657 } 2658 2583 2659 2584 2660 static proc s_syz(def I)
Note: See TracChangeset
for help on using the changeset viewer.