Changeset 72382c2 in git
- Timestamp:
- Dec 12, 2008, 6:27:01 PM (14 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 73b186d5bc4b455e4e5d630d447f6d74c3cb0f80
- Parents:
- 148455ccfcf8b41197478663486901ebf24ab661
- Location:
- Singular/LIB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/surf.lib
r148455 r72382c2 1 1 // last modified 21.07.2005, Oliver Wienand 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: surf.lib,v 1.2 8 2007-07-13 12:31:06Singular Exp $";3 version="$Id: surf.lib,v 1.29 2008-12-12 17:27:01 Singular Exp $"; 4 4 category="Visualization"; 5 5 info=" … … 24 24 25 25 /////////////////////////////////////////////////////////////////////////////// 26 static proc num_of_vars(ideal I) 26 proc num_of_vars(ideal I) 27 "USAGE: num_of_vars(ideal I) 28 29 RETURN: an intvec containing one entry for each ring variable. 30 each contains the sums of all degrees in this variable of all monomials 31 occuring in the ideal. 32 An entry is zero iff the corresponding variable does not occur in the ideal. 33 " 27 34 { 28 35 intvec v; 29 36 int i; 30 37 poly p; 31 for(i= size(I);i>0;i--)38 for(i=ncols(I);i>0;i--) 32 39 { 33 40 p=I[i]; … … 39 46 } 40 47 return(v); 48 } 49 example 50 { 51 "EXAMPLE:"; echo = 2; 52 ring r = 0, (x,y,z),dp; 53 ideal j0 = x^2-x*y; 54 num_of_vars(j0); 55 ideal j1 = x^2-x*y-y; 56 num_of_vars(j1); 57 ideal j2 = x^2-x*y-y, x^3-2*y; 58 num_of_vars(j2); 41 59 } 42 60 -
Singular/LIB/surfex.lib
r148455 r72382c2 1 1 //last change: 2007/07/06 (Oliver Labs) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: surfex.lib,v 1. 7 2008-10-13 21:32:53 keilenExp $";3 version="$Id: surfex.lib,v 1.8 2008-12-12 17:27:01 Singular Exp $"; 4 4 category="Visualization"; 5 5 info=" … … 36 36 LIB "primdec.lib"; 37 37 LIB "sing.lib"; 38 LIB "surf.lib"; 38 39 39 40 /////////////////////////////////////////////////////////// … … 1100 1101 1101 1102 1102 proc num_of_vars(ideal I)1103 "1104 USAGE: num_of_vars(ideal I)1105 1106 RETURN: an intvec containing one entry for each ring variable.1107 each contains the sums of all degrees in this variable of all monomials1108 occuring in the ideal.1109 An entry is zero iff the corresponding variable does not occur in the ideal.1110 "1111 {1112 intvec v;1113 int i;1114 poly p;1115 for(i=size(I);i>0;i--)1116 {1117 p=I[i];1118 while(p!=0)1119 {1120 v=v+leadexp(p);1121 p=p-lead(p);1122 }1123 }1124 return(v);1125 }1126 example {1127 "EXAMPLE:"; echo = 2;1128 ring r = 0, (x,y,z),dp;1129 ideal j0 = x^2-x*y;1130 num_of_vars(j0);1131 ideal j1 = x^2-x*y-y;1132 num_of_vars(j1);1133 ideal j2 = x^2-x*y-y, x^3-2*y;1134 num_of_vars(j2);1135 }1136 1137 1138 1103 proc num_vars_id(ideal I) 1139 1104 "
Note: See TracChangeset
for help on using the changeset viewer.