Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edges in collect(edges(g)) should be ordered by index #75

Open
CarloLucibello opened this issue Jun 12, 2017 · 1 comment
Open

edges in collect(edges(g)) should be ordered by index #75

CarloLucibello opened this issue Jun 12, 2017 · 1 comment

Comments

@CarloLucibello
Copy link
Owner

for the Network type, and more generally for graphs with indexed edges.

Right now edges are iterated in lexycographic order for (src,dst):

julia> g= Network(10,20)
Network(10, 20) with [] graph, [] vertex, [] edge properties

julia> collect(edges(g))
20-element Array{Erdos.IndexedEdge,1}:
 (1=>4,4)  
 (1=>7,11) 
 (1=>5,16) 
 (1=>9,17) 
 (2=>3,7)  
 (2=>9,12) 
 (3=>10,9) 
 (3=>7,10) 
 (3=>8,18) 
 (4=>10,2) 
 (4=>5,5)  
 (4=>6,6)  
 (4=>7,15) 
 (5=>9,1)  
 (5=>6,19) 
 (6=>8,14) 
 (6=>9,20) 
 (7=>9,3)  
 (8=>9,8)  
 (8=>10,13)
@CarloLucibello
Copy link
Owner Author

It is impossible to have efficient iteration by index order with the current implementation of Network. Probably this is issue is a won't fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant