Changeset 437cdbc in git
- Timestamp:
- Jul 3, 2017, 1:12:20 PM (7 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- d2096d80b66af9a0624c996b1dea2e23bb741ee2
- Parents:
- 23f6f42c45f6eb83ed89c5915c3b9001438f2c86
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/fpadim.lib
r23f6f4 r437cdbc 1138 1138 proc lpUfGkDim(ideal G) 1139 1139 { 1140 G = lead(G); 1141 1142 int l = 0; 1143 for (int i = 1; i <= size(G); i++) { 1144 // find the max degree in G 1145 int d = deg(G[i]); 1146 if (d > l) { 1147 l = d; 1148 } 1149 1150 // also if G is the whole ring return minus infinity 1151 if (leadmonom(G[i]) == 1) { 1152 return(-2); // minus infinity 1153 } 1154 } 1155 // if longet word has length 1 we handle it as a special case 1156 if (l == 1) { 1157 int n = attrib(basering, "lV"); // variable count 1158 int k = size(G); 1159 if (k == n) { 1160 return(0); 1161 } 1162 if (k == n-1) { 1163 return(1); 1164 } 1165 if (k <= n-2) { 1166 return(-1); 1167 } 1168 } 1169 1170 // otherwise count cycles in the Ufnarovskij Graph 1140 1171 return(UfGraphGrowth(lpUfGraph(G))); 1141 1172 }
Note: See TracChangeset
for help on using the changeset viewer.