Skip to content

Commit a3c2f39

Browse files
committed
Update treksDynamic.m2
- both variants for the generation of all paths raise an error for cyclic graphs - allTreks is improved to give a more useful output for the application - allTreks improved to run significantly faster
1 parent 46e102a commit a3c2f39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

treksDynamic.m2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,15 @@ BfsPathGen = (G, V) -> (
117117

118118
-- sum(apply(1000, x -> (elapsedTiming(pathGen(G)))#0))
119119
-- sum(apply(1000, x -> (elapsedTiming(BfsPathGen(G)))#0))
120+
-- how about testing when each of the pathgen is faster and allTreks calls the programs accordingly=
120121

121122
-- from my testting Bfs is better in non-sparse situations while normal is faster in sparse graphs
122123
-- none of them have propper loop protection (for cyclic graphs) at the moment
123124
---
124125

125126

126127

127-
-- for application need (top, path1, path2) where top is source of both paths -> tensor endpoint1 => endpont2 => top => all treks connecting them
128+
-- for application need (top, path1, path2) where top is source of both paths -> tensor endpoint1 => endpoint2 => top => all treks connecting them
128129
allTreks = (G) -> (
129130
V = vertices (G);
130131
paths = pathGen(G, V);

0 commit comments

Comments
 (0)