17 May
2016
17 May
'16
1:25 a.m.
I wasn't going on about indexes because of speed concerns regarding iterators. Node/arc/edge-Id's ARE the indexes into the node/arc vectors. This (indexes-) idea makes LEMON Graph Library much faster than BGL (it's also easier to use by the way, no need to read a book). Sure one could store iterators, but given the iterators' size, this "solution" would make the whole thing rather cache-unfriendly as compared to just storing uint32_t's.
Why would you store iterators? Just store a pointer. And no, indexes aren't faster for referencing than pointes, even with std::vector - I've done the benchmarks.