Changeset b4ee8d in git
- Timestamp:
- Nov 27, 2017, 3:35:27 PM (6 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 5482cda1add93a178960d9c5cb78caabd603c0fc
- Parents:
- 927cae09bf14e3dc0a1f6d1af5bfc39a666fd51f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/fpadim.lib
r927cae rb4ee8d 1243 1243 if (G[v,w] == 1) { 1244 1244 if (visited[w] == 1) { 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1245 // new cycle 1246 if (v == w) { 1247 for (int u = 1; u <= ncols(G); u++) { 1248 if (G[v,u] && u != v) { 1249 outFlag = 2; 1250 } 1251 if (G[u,v] && u != v) { 1252 inFlag = 1; 1253 } 1254 } 1255 } else { 1256 for (int i = size(path); i >= 1; i--) { // for each vertex in the path 1257 // check for neighbors not directly next or prev in cycle 1258 for (int u = 1; u <= ncols(G); u++) { 1259 if (G[path[i],u] == 1) { // there is an edge to u 1260 if (path[i] != v) { 1261 if (u != path[i+1]) { // and u is not the next element in the cycle 1262 outFlag = 2; 1263 } 1264 } else { 1265 if (u != w) { 1266 outFlag = 2; 1267 } 1268 } 1269 } 1270 if (G[u,path[i]] == 1) { // there is an edge from u 1271 if (path[i] != w) { 1272 if (u != path[i-1]) { // and u is not the previous element in the cylce 1273 inFlag = 1; 1274 } 1275 } else { 1276 if (u != v) { 1277 inFlag = 1; 1278 } 1279 } 1280 } 1281 } 1282 if (path[i] == w) { 1283 break; 1284 } 1285 } 1286 } 1287 1287 } else { 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1288 int inOutFlags = inOrOutCommingEdgeInCycle(G, w, visited, path); 1289 if (inOutFlags == 1) { 1290 inFlag = 1; 1291 } 1292 if (inOutFlags == 2) { 1293 outFlag = 2; 1294 } 1295 if (inOutFlags == 3) { 1296 inFlag = 1; 1297 outFlag = 2; 1298 } 1299 1299 } 1300 1300 }
Note: See TracChangeset
for help on using the changeset viewer.