-
Notifications
You must be signed in to change notification settings - Fork 185
Improve performance of edge iters #1202
Improve performance of edge iters #1202
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1202 +/- ##
==========================================
- Coverage 99.62% 99.62% -0.01%
==========================================
Files 94 94
Lines 4317 4311 -6
==========================================
- Hits 4301 4295 -6
Misses 16 16 |
Why use |
The problem with with |
@simonschoelly is this ready to go, or is there still an issue with overloading an unexported function from |
I think you are confusing this PR with #1137 - we are not overloading any unexported functions here. |
I am. Thanks for setting me straight. I'm generally ok with adding |
So, should I write a version using |
I think we can merge this as it stands. |
This PR improves the performance of the edge iterators. It also fixes a bug, where the edge iterator would not work, when
nv(g) == typemax(eltype(g))
.The previous implementation was for
SimpleAbstractGraph
, so I kept that by usingSimpleTraits
for distinguishing between directed and undirected graphs, but all other implementations in theSimpleGraphs
submodule seem to be only implemented forSimpleGraph
andSimpleDiGraph
, so we might also do that.Some benchmarks for
collect
, it might still be useful to implementcollect
directly though (see also #1201 )