Changeset 4debdbd in git
- Timestamp:
- Jun 23, 2005, 5:45:54 PM (18 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 2b2f129623a7ca03bcdf91ec54a2bc86e8a452e8
- Parents:
- 87fc8ed722fda44b3c35f66ec2220e0231bfea35
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/lejeune.lib
r87fc8e r4debdbd 1 1 2 2 //-*- mode:C++;-*- 3 // $Id: lejeune.lib,v 1. 5 2005-06-23 13:52:12cremer Exp $3 // $Id: lejeune.lib,v 1.6 2005-06-23 15:45:54 cremer Exp $ 4 4 5 5 6 6 info=" 7 LIBRARY: lejeune 1.4.lib Arc space computations7 LIBRARY: lejeune.lib Arc space computations 8 8 AUTHOR: Nadine Cremer, nadine.cremer@gmx.de 9 9 [SEE ALSO: <comma-separated words of cross references>] … … 18 18 N is number of variables of input f 19 19 formaldiff(f,k); computes the formal derivatives D_I with |I|<k 20 f_set(f,H); returns the set F corresponding to H as described by 21 M. Lejeune 20 22 "; 21 23 22 24 23 LIB "ring.lib"; 25 LIB "ring.lib"; // need procedures from these libs 24 26 LIB "general.lib"; 27 28 29 30 proc f_set (poly f,intvec H) 31 { 32 int p; // loop variable 33 int m_0=ord(f); 34 int b=size(H); 35 int c=sum(H,1..b-1); 36 if(H[1]!=m_0) // input admissible?! 37 { 38 "H[1]=ord(f) notwendig!!"; 39 return(0); 40 } 41 for(p=1;p<b;p++) 42 { 43 if(H[p]<H[p+1]) 44 { 45 "Unzulaessige Eingabe, H[1]<=...<=H[b] notwendig!"; 46 return(0); 47 } 48 } 49 def r=basering; // need that in iteration 50 ideal resultf_set,step,I; // save result resp. prelim. result 51 for(p=1;p<b-1;p++) // iterating steps 52 { 53 def tmp=f_set(f,H[1..p+1]); 54 setring(tmp); 55 def tmp1=resultf_set; 56 step=tmp1; 57 export(step); 58 step;~ 59 setring(r); 60 } 61 def R=formaldiff(f,b-1,c,H[b]); // actual step 62 setring R; 63 def T=resultdiff; 64 ideal resultf_set=T; 65 export(resultf_set); 66 resultf_set; 67 return(R); 68 } 69 25 70 26 71 … … 38 83 ideal m; // loops... 39 84 ideal m1,m2,J,resultdiff; 40 for(v= 0;v<=k-1;v++) // consider the differentcoeff.85 for(v=1;v<=k;v++) // consider the different t-coeff. 41 86 { 42 87 fkv=coe[a+v,1]; … … 56 101 resultdiff=resultdiff,J; 57 102 } 103 resultdiff=simplify(resultdiff,2); 58 104 export(resultdiff); // exports the result 59 105 return(R); // return the ring … … 83 129 proc ringchange (int i) 84 130 { 85 int startvar=nvars(basering); 86 export(startvar); 131 int startvar; 132 startvar=nvars(basering); 133 export(startvar); 87 134 string str=variables(startvar,i); 88 def R=changevar(""+varstr( r)+",t,"+variables(startvar,i)+"");// change135 def R=changevar(""+varstr(basering)+",t,"+variables(startvar,i)+"");// change 89 136 return(R); // return the ring, needed in future proc 90 137 } … … 105 152 } 106 153 } 107 //l=insert(l,"t");108 154 string str1=string(l); // makes the list into a string, 109 155 return(str1); // (needed for ring change) … … 126 172 127 173 proc tpolys (int i,int k) // constructs polynomials a(1)*t+... 128 { // has to be called from tpolys174 { // has to be called from pluin_coeffs 129 175 int s,t; // loop variables 130 176 int v;
Note: See TracChangeset
for help on using the changeset viewer.