macks22 / comdetect

Community detection algorithm implementations.
1 stars 1 forks source link

Hash each edge pair to lookup edge id. #11

Closed macks22 closed 9 years ago

macks22 commented 9 years ago

Currently the findEdgeId function consumes a good deal of time. This can be made nearly constant time by creating a hash table which maps from edge pairs, represented as a string, "i j", to the edge id values.

It might be valuable to do this for other edge attributes as well. Ideally we store an Edge struct somewhere with all edge attributes and access it via the "i j" hash.