Changeset 5ecf042 in git
- Timestamp:
- Dec 19, 2000, 7:31:48 PM (22 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '00e2e9c41af3fde1273eb3633f4c0c7c3db2579d')
- Children:
- 7022cd9d4b1177139f7d205efecb93fa232cc319
- Parents:
- b9d57bdc42ac80a762bda08cdb917d46e9f35616
- Location:
- Singular
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/makedbm.lib
rb9d57b r5ecf042 1 // $Id: makedbm.lib,v 1. 9 2000-12-19 15:05:29 anneExp $1 // $Id: makedbm.lib,v 1.10 2000-12-19 18:31:47 obachman Exp $ 2 2 //========================================================================= 3 3 // … … 6 6 //============================================================================= 7 7 8 version="$Id: makedbm.lib,v 1. 9 2000-12-19 15:05:29 anneExp $";9 category=" Utilities";8 version="$Id: makedbm.lib,v 1.10 2000-12-19 18:31:47 obachman Exp $"; 9 category="Miscellaneous"; 10 10 info=" 11 11 LIBRARY: makedbm.lib some usefull tools needed by the Arnold-Classifier. -
Singular/LIB/standard.lib
rb9d57b r5ecf042 1 // $Id: standard.lib,v 1.5 0 2000-12-19 15:05:39 anneExp $1 // $Id: standard.lib,v 1.51 2000-12-19 18:31:47 obachman Exp $ 2 2 ////////////////////////////////////////////////////////////////////////////// 3 3 4 version="$Id: standard.lib,v 1.5 0 2000-12-19 15:05:39 anneExp $";5 category=" Utilities";4 version="$Id: standard.lib,v 1.51 2000-12-19 18:31:47 obachman Exp $"; 5 category="Miscellaneous"; 6 6 info=" 7 7 LIBRARY: standard.lib PROCEDURES WHICH ARE ALWAYS LOADED AT START-UP -
Singular/LIB/template.lib
rb9d57b r5ecf042 1 1 //////////////////////////////////////////////////////////////////// 2 2 // version string automatically expanded by CVS 3 version="$Id: template.lib,v 1. 7 2000-12-19 15:05:44 anneExp $";3 version="$Id: template.lib,v 1.8 2000-12-19 18:31:48 obachman Exp $"; 4 4 // summary description of the library 5 category=" Utilities";5 category="Miscellaneous"; 6 6 info=" 7 7 LIBRARY: template.lib A TEMPLATE FOR A SINGULAR LIBRARY -
Singular/Makefile.in
rb9d57b r5ecf042 214 214 poly.lib presolve.lib primdec.lib primitiv.lib\ 215 215 qhmoduli.lib random.lib ring.lib sing.lib \ 216 solve.lib solve r.libspcurve.lib standard.lib\216 solve.lib solve.lib spcurve.lib standard.lib\ 217 217 surf.lib triang.lib template.lib spectrum.lib\ 218 218 mregular.lib toric.lib intprog.lib gaussman.lib -
Singular/iparith.cc
rb9d57b r5ecf042 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.24 3 2000-12-18 18:26:31 SingularExp $ */4 /* $Id: iparith.cc,v 1.244 2000-12-19 18:31:39 obachman Exp $ */ 5 5 6 6 /* … … 3173 3173 hom=isHomog; 3174 3174 } 3175 //if (hasFlag(v,FLAG_STD)) 3176 // result=stdred((ideal)v->Data(),currQuotient,hom,&w); 3177 //else 3178 result=kStd((ideal)(v->Data()),currQuotient,hom,&w); 3175 result=kStd((ideal)(v->Data()),currQuotient,hom,&w); 3179 3176 idSkipZeroes(result); 3180 3177 res->data = (char *)result; -
Singular/kInline.cc
rb9d57b r5ecf042 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: kInline.cc,v 1. 19 2000-12-14 16:38:49obachman Exp $9 * Version: $Id: kInline.cc,v 1.20 2000-12-19 18:31:40 obachman Exp $ 10 10 *******************************************************************/ 11 11 #ifndef KINLINE_CC … … 63 63 return T; 64 64 } 65 65 66 KINLINE TObject* skStrategy::s_2_t(int i) 67 { 68 if (i >= 0 && i <= sl) 69 { 70 int sri= S_2_R[i]; 71 if (sri >= 0 && sri <= tl) 72 { 73 TObject* t = R[sri]; 74 if (t != NULL && t->p == S[i]) 75 return t; 76 } 77 // last but not least, try kFindInT 78 sri = kFindInT(S[i], T, tl); 79 if (sri >= 0) 80 return &(T[sri]); 81 } 82 return NULL; 83 } 84 66 85 /*************************************************************** 67 86 * … … 984 1003 } 985 1004 1005 KINLINE poly redtailBba(TObject *T, int pos,kStrategy strat, BOOLEAN withT) 1006 { 1007 LObject L; 1008 L = *T; 1009 poly p = redtailBba(&L, pos, strat, FALSE); 1010 *T = L; 1011 kTest_T(T); 1012 assume( p == T->p); 1013 return p; 1014 } 986 1015 987 1016 #endif // defined(KINLINE) || defined(KUTIL_CC) -
Singular/kstd2.cc
rb9d57b r5ecf042 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kstd2.cc,v 1.6 8 2000-12-18 13:30:36obachman Exp $ */4 /* $Id: kstd2.cc,v 1.69 2000-12-19 18:31:41 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT - Kernel: alg. of Buchberger … … 786 786 } 787 787 788 static ideal bbared (ideal F, ideal Q,kStrategy strat) 789 { 790 791 /* complete reduction of the standard basis--------- */ 792 completeReduce(strat); 793 /* release temp data-------------------------------- */ 794 exitBuchMora(strat); 795 if (TEST_OPT_WEIGHTM) 796 { 797 pFDeg=pFDegOld; 798 pLDeg=pLDegOld; 799 if (ecartWeights) 800 { 801 omFreeSize((ADDRESS)ecartWeights,(pVariables+1)*sizeof(short)); 802 ecartWeights=NULL; 803 } 804 } 805 if (Q!=NULL) updateResult(strat->Shdl,Q,strat); 806 return (strat->Shdl); 807 } 808 809 ideal stdred(ideal F, ideal Q, tHomog h,intvec ** w) 810 { 811 ideal r; 812 BOOLEAN b=pLexOrder,toReset=FALSE; 813 BOOLEAN delete_w=(w==NULL); 814 kStrategy strat=new skStrategy; 815 816 if (rField_has_simple_inverse()) 817 strat->LazyPass=20; 818 else 819 strat->LazyPass=2; 820 strat->LazyDegree = 1; 821 strat->ak = idRankFreeModule(F); 822 if ((h==testHomog)) 823 { 824 if (strat->ak==0) 825 { 826 h = (tHomog)idHomIdeal(F,Q); 827 w=NULL; 828 } 829 else 830 h = (tHomog)idHomModule(F,Q,w); 831 } 832 if (h==isHomog) 833 { 834 if ((w!=NULL) && (*w!=NULL)) 835 { 836 kModW = *w; 837 strat->kModW = *w; 838 pOldFDeg = pFDeg; 839 pFDeg = kModDeg; 840 toReset = TRUE; 841 } 842 pLexOrder = TRUE; 843 strat->LazyPass*=2; 844 } 845 strat->homog=h; 846 initBuchMoraCrit(strat); /*set Gebauer, honey, sugarCrit*/ 847 initBuchMoraPos(strat); 848 if (pOrdSgn==1) 849 initBba(F,strat); 850 else 851 initMora(F,strat); 852 initBuchMora(F, Q,strat); 853 //initS(F,Q,strat); 854 // Ende der Initalisierung 855 r=bbared(F,Q,strat); 856 #ifdef KDEBUG 857 int i; 858 for (i=0; i<IDELEMS(r); i++) pTest(r->m[i]); 859 #endif 860 // Ende: aufraeumen 861 if (toReset) 862 { 863 kModW = NULL; 864 pFDeg = pOldFDeg; 865 } 866 pLexOrder = b; 867 delete(strat); 868 if ((delete_w)&&(w!=NULL)&&(*w!=NULL)) delete *w; 869 idSkipZeroes(r); 870 return r; 871 } 788 -
Singular/kutil.cc
rb9d57b r5ecf042 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.8 6 2000-12-18 17:47:18obachman Exp $ */4 /* $Id: kutil.cc,v 1.87 2000-12-19 18:31:41 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for kStd … … 647 647 } 648 648 } 649 r_assume(L->max == NULL);650 649 if (L->p1 == NULL) 651 650 { … … 776 775 return dReportError("L[%d].i_r2 out of sync", i); 777 776 } 777 if (strat->L[i].i_r != -1) 778 return dReportError("L[%d].i_r out of sync", i); 778 779 } 779 780 return TRUE; … … 3991 3992 for (i=strat->sl; i>0; i--) 3992 3993 { 3993 //if (strat->interpt) test_int_std(strat->kIdeal); 3994 strat->S[i] = redtailBba(strat->S[i],i-1,strat); 3994 TObject* T_j = strat->s_2_t(i); 3995 if (T_j != NULL) 3996 { 3997 assume(strat->S[i] == T_j->p); 3998 strat->S[i] = redtailBba(T_j, i-1, strat); 3999 assume(strat->S[i] == T_j->p); 4000 if (strat->redTailChange && strat->tailRing != currRing) 4001 { 4002 if (T_j->max != NULL) p_LmFree(T_j->max, strat->tailRing); 4003 if (pNext(T_j->p) != NULL) 4004 T_j->max = p_GetMaxExpP(pNext(T_j->p), strat->tailRing); 4005 else 4006 T_j->max = NULL; 4007 } 4008 } 4009 else 4010 strat->S[i] = redtailBba(strat->S[i],i-1,strat); 4011 3995 4012 if (TEST_OPT_INTSTRATEGY) 3996 4013 { … … 4130 4147 4131 4148 if (L != NULL && L->tailRing != new_tailRing) 4132 L->ShallowCopyDelete(new_tailRing, p_shallow_copy_delete); 4133 if (T != NULL && T->tailRing != new_tailRing) 4149 { 4150 if (L->i_r < 0) 4151 L->ShallowCopyDelete(new_tailRing, p_shallow_copy_delete); 4152 else 4153 { 4154 assume(L->i_r <= strat->tl); 4155 TObject* t_l = strat->R[L->i_r]; 4156 assume(t_l != NULL); 4157 L->tailRing = new_tailRing; 4158 L->p = t_l->p; 4159 L->t_p = t_l->t_p; 4160 L->max = t_l->max; 4161 } 4162 } 4163 4164 if (T != NULL && T->tailRing != new_tailRing && T->i_r < 0) 4134 4165 T->ShallowCopyDelete(new_tailRing, new_tailBin, p_shallow_copy_delete); 4135 4166 … … 4172 4203 } 4173 4204 4174 #endif // KUTIL_CC4175 4205 4176 4206 #if 0 … … 4325 4355 4326 4356 #endif 4357 4358 #endif // KUTIL_CC -
Singular/kutil.h
rb9d57b r5ecf042 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: kutil.h,v 1.5 0 2000-12-18 17:47:17obachman Exp $ */6 /* $Id: kutil.h,v 1.51 2000-12-19 18:31:42 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT: kernel: utils for kStd … … 60 60 length, // as of pLDeg 61 61 pLength, // either == 0, or == pLength(p) 62 i_r; // index of TObject in R set 63 BOOLEAN is_normalized; // true, if pNor am was called on p, false otherwise62 i_r; // index of TObject in R set, or -1 if not in T 63 BOOLEAN is_normalized; // true, if pNorm was called on p, false otherwise 64 64 65 65 // initialization … … 284 284 KINLINE ~skStrategy(); 285 285 286 // return TObject corresponding to S[i] 286 // return TObject corresponding to S[i]: assume that it exists 287 // i.e. no error checking is done 287 288 KINLINE TObject* S_2_T(int i); 289 // like S_2_T, except that NULL is returned if it can not be found 290 KINLINE TObject* s_2_t(int i); 288 291 }; 289 292 … … 331 334 KINLINE poly redtailBba (poly p,int pos,kStrategy strat); 332 335 poly redtailBba (LObject *L, int pos,kStrategy strat, BOOLEAN withT = FALSE); 336 poly redtailBba (TObject *T, int pos,kStrategy strat, BOOLEAN withT = FALSE); 333 337 poly redtail (poly p,int pos,kStrategy strat); 334 338 poly redtail (LObject *L,int pos,kStrategy strat); -
Singular/libparse.l
rb9d57b r5ecf042 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 /* $Id: libparse.l,v 1.4 3 2000-12-12 11:06:00 anneExp $ */5 /* $Id: libparse.l,v 1.44 2000-12-19 18:31:43 obachman Exp $ */ 6 6 #include <stdio.h> 7 7 #include <string.h> … … 105 105 #ifdef STANDALONE_PARSER 106 106 procinfov pi; 107 int category_out = 0; 107 108 void printpi(procinfov pi); 108 109 void pi_clear(procinfov pi); … … 293 294 printf("\";\n"); 294 295 } 295 else 296 else if (!category_out) 296 297 printf("Version:%s;\n", libnamebuf); 297 298 #else … … 896 897 { 897 898 #ifdef STANDALONE_PARSER 898 if (texinfo_out && (last_cmd == LP_INFO || last_cmd == LP_CATEGORY)) 899 if ((texinfo_out && (last_cmd == LP_INFO || last_cmd == LP_CATEGORY)) || 900 (category_out && last_cmd == LP_CATEGORY)) 899 901 { 900 902 long current_location = ftell(yylpin), i = string_start, quote = 0; 901 903 char c; 902 if ( last_cmd == LP_INFO)904 if (texinfo_out) 903 905 { 904 printf("$info = <<EOT;\n"); 905 } 906 else 907 { 908 printf("$category = <<EOT;\n"); 906 if (last_cmd == LP_INFO) 907 { 908 printf("$info = <<EOT;\n"); 909 } 910 else 911 { 912 printf("$category = <<EOT;\n"); 913 } 909 914 } 910 915 fseek (yylpin, i, SEEK_SET); … … 926 931 i++; 927 932 } 933 if (category_out) exit(0); 928 934 fseek (yylpin, current_location, SEEK_SET); 929 935 printf("\nEOT\n"); … … 995 1001 exit(1); 996 1002 } 997 if (! texinfo_out)1003 if (! (texinfo_out || category_out)) 998 1004 { 999 1005 if(lpverbose)printf("Verbose level=%d\n", lpverbose); -
Singular/maps.cc
rb9d57b r5ecf042 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: maps.cc,v 1.3 2 2000-12-15 18:49:33 SingularExp $ */4 /* $Id: maps.cc,v 1.33 2000-12-19 18:31:43 obachman Exp $ */ 5 5 /* 6 6 * ABSTRACT - the mapping of polynomials to other rings … … 215 215 216 216 memcpy(names, currRing->names, currRing->N*sizeof(char*)); 217 memcpy(&(names[currRing->N]), theImageRing->names, (theImageRing->N*sizeof(char*))); 217 218 sip_sring tmpR; 218 219 -
Singular/misc.cc
rb9d57b r5ecf042 474 474 Werror("unknown option `%s`",n); 475 475 okay: 476 if (currRing != NULL) 477 currRing->options = test & TEST_RINGDEP_OPTS; 476 478 omFree((ADDRESS)n); 477 479 v=v->next; -
Singular/numbers.cc
rb9d57b r5ecf042 2 2 * Computer Algebra System SINGULAR * 3 3 *****************************************/ 4 /* $Id: numbers.cc,v 1.3 3 2000-12-15 18:49:34 SingularExp $ */4 /* $Id: numbers.cc,v 1.34 2000-12-19 18:31:44 obachman Exp $ */ 5 5 6 6 /* … … 111 111 { 112 112 naSetChar(c,r); 113 test |= Sy_bit(OPT_INTSTRATEGY); /*intStrategy*/114 test &= ~Sy_bit(OPT_REDTAIL); /*noredTail*/115 }116 else if (rField_is_Q(r))117 {118 test |= Sy_bit(OPT_INTSTRATEGY); /*26*/119 113 } 120 114 else if (rField_is_Zp(r)) … … 122 116 { 123 117 npSetChar(c, r); 124 test &= ~Sy_bit(OPT_INTSTRATEGY); /*26*/125 118 } 126 119 /* -------------- GF(p^m) -----------------------*/ 127 120 else if (rField_is_GF(r)) 128 121 { 129 test &= ~Sy_bit(OPT_INTSTRATEGY); /*26*/130 122 nfSetChar(c,r->parameter); 131 123 } -
Singular/polys.cc
rb9d57b r5ecf042 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: polys.cc,v 1.7 2 2000-12-18 13:30:38obachman Exp $ */4 /* $Id: polys.cc,v 1.73 2000-12-19 18:31:44 obachman Exp $ */ 5 5 6 6 /* … … 58 58 if (complete) 59 59 { 60 if ((r->LexOrder) || (r->OrdSgn==-1)) 61 test &= ~Sy_bit(OPT_REDTAIL); /* noredTail */ 62 63 if (!TEST_OPT_OLDSTD && r->OrdSgn == 1 && ! r->LexOrder) 64 test |= Sy_bit(OPT_REDTHROUGH); 65 else 66 test &= ~Sy_bit(OPT_REDTHROUGH); 60 test &= ~ TEST_RINGDEP_OPTS; 61 test |= r->options; 67 62 } 68 63 } -
Singular/ring.cc
rb9d57b r5ecf042 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: ring.cc,v 1.15 0 2000-12-14 16:38:54obachman Exp $ */4 /* $Id: ring.cc,v 1.151 2000-12-19 18:31:45 obachman Exp $ */ 5 5 6 6 /* … … 95 95 /*------------ set global ring vars --------------------------------*/ 96 96 currQuotient=r->qideal; 97 /*------------ set redTail, except reset by nSetChar or pSetGlobals */98 test |= Sy_bit(OPT_REDTAIL);99 97 100 98 /*------------ global variables related to coefficients ------------*/ … … 2843 2841 } 2844 2842 2843 static void rSetOption(ring r) 2844 { 2845 // set redthrough 2846 if (!TEST_OPT_OLDSTD && r->OrdSgn == 1 && ! r->LexOrder) 2847 r->options |= Sy_bit(OPT_REDTHROUGH); 2848 else 2849 r->options &= ~Sy_bit(OPT_REDTHROUGH); 2850 2851 // set intStrategy 2852 if (rField_is_Extension(r) || rField_is_Q(r)) 2853 r->options |= Sy_bit(OPT_INTSTRATEGY); 2854 else 2855 r->options &= ~Sy_bit(OPT_INTSTRATEGY); 2856 2857 // set redTail 2858 if (r->LexOrder || r->OrdSgn == -1 || rField_is_Extension(r)) 2859 r->options &= ~Sy_bit(OPT_REDTAIL); 2860 else 2861 r->options |= Sy_bit(OPT_REDTAIL); 2862 } 2863 2845 2864 BOOLEAN rComplete(ring r, int force) 2846 2865 { … … 2849 2868 rSetOutParams(r); 2850 2869 rSetDegStuff(r); 2870 rSetOption(r); 2851 2871 int n=rBlocks(r)-1; 2852 2872 int i; -
Singular/structs.h
rb9d57b r5ecf042 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: structs.h,v 1. 49 2000-12-15 18:49:36 SingularExp $ */6 /* $Id: structs.h,v 1.50 2000-12-19 18:31:46 obachman Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 352 352 char ** names; /* array of variable names */ 353 353 354 unsigned long options; /* ring dependent options */ 355 354 356 // what follows below here should be set by rComplete, _only_ 355 357 long *ordsgn; /* array of +/- 1 (or 0) for comparing monomials */ -
Singular/tok.h
rb9d57b r5ecf042 7 7 * ABSTRACT: tokens, types for interpreter; general macros 8 8 */ 9 /* $Id: tok.h,v 1.4 8 2000-12-18 13:30:39obachman Exp $ */9 /* $Id: tok.h,v 1.49 2000-12-19 18:31:46 obachman Exp $ */ 10 10 11 11 #ifndef MYYSTYPE … … 203 203 #define OPT_WEIGHTM 31 204 204 205 /* define ring dependent options */ 206 #define TEST_RINGDEP_OPTS \ 207 (Sy_bit(OPT_INTSTRATEGY) | Sy_bit(OPT_REDTHROUGH) | Sy_bit(OPT_REDTAIL)) 208 205 209 #define TEST_OPT_PROT BTEST1(OPT_PROT) 206 210 #define TEST_OPT_REDSB BTEST1(OPT_REDSB) -
Singular/utils.cc
rb9d57b r5ecf042 15 15 extern int lpverbose, check; 16 16 extern int texinfo_out; 17 extern int category_out; 17 18 extern int found_version, found_info, found_oldhelp, found_proc_in_proc; 18 19 int warning_info = 0, warning_version = 0; … … 27 28 printf(" -s : turns on reporting about violations of unenforced syntax rules\n"); 28 29 printf(" -i : perl output of examples and help of procs\n"); 30 printf(" -c : print category of lib to stdout and exit\n"); 29 31 printf(" -h : print this message\n"); 30 32 exit(1); … … 39 41 char c; 40 42 41 while((c=fe_getopt(argc, argv, "ihd :sf:"))>=0) {43 while((c=fe_getopt(argc, argv, "ihdc:sf:"))>=0) { 42 44 switch(c) { 43 45 case 'd': … … 54 56 texinfo_out = 1; 55 57 break; 58 case 'c': 59 category_out = 1; 60 break; 61 56 62 case 'h' : 57 63 usage(argv[0]); 58 64 break; 59 60 65 case -1 : printf("no such option:%s\n", argv[fe_optind]); 61 66 usage(argv[0]); … … 65 70 } 66 71 } 67 if (texinfo_out ) lpverbose = 0;72 if (texinfo_out || category_out) lpverbose = 0; 68 73 69 74 if(lib_file!=NULL) { 70 75 yylpin = fopen( lib_file, "rb" ); 71 if (! texinfo_out)76 if (! (texinfo_out || category_out)) 72 77 printf("Checking library '%s'\n", lib_file); 73 else 78 else if (! category_out) 74 79 printf("$library = \"%s\";\n", lib_file); 75 80 } else { … … 79 84 { 80 85 lib_file = argv[fe_optind]; 81 if (! texinfo_out)86 if (! (texinfo_out || category_out) ) 82 87 printf("Checking library '%s'\n", argv[fe_optind]); 83 else 88 else if (! category_out) 84 89 printf("$library = \"%s\";\n", lib_file); 85 90 } … … 207 212 } 208 213 } 209 else 214 else if (! category_out) 210 215 { 211 216 if(lpverbose) printf("// ");
Note: See TracChangeset
for help on using the changeset viewer.