Horst Duchêne

Results 11 comments of Horst Duchêne

@doudou : Thank you for your pull request. I have some comments: 1. DirectedAdjacencyGraph and BidirectionalDirectedAdjacencyGraph contain much code duplication (several methods are identical). We should factor out this common...

I do not insist on using the base.rb implementations. If you prefer reimplementing with the more efficient versions, just go for it. This should then be mentioned in the method...

Yes, as I said above: each_in_neighbour should be included in BidirectionalGraph. > - each_in_neighbour # only method which has to be implemented > - in_neighbours # Should be included in...

Ah, sorry. Yes each_out_neighbour should go to bidirectional.rb, as well as the aliases: ``` alias :each_adjacent :each_out_neighbour alias :adjacent_vertices :out_neighbours ``` out_neighbours could also be implemented in bidirectional module with...

> Perhaps not the most time- or memory-efficient implementation but reasonable in both respects with very little implementation code. But that is the promise in https://monora.github.io/rgl/RGL/BidirectionalGraph.html: > The BidirectionalGraph concept...

> Barring that, any reason not to implement `each_in_neighbor()` in the straightforward naive fashion? Efficiency is not really an issue for graphs of moderate size. Here, this would not be...

That said, we could relax the promise in the documentation and provide @StevenJenkinsJPL's inefficient but elegant solution. @doudou What do you think?

@jsjuni Thank you, looks promising. Could you create a PR, where we can comment the changes.

There is no 'rgl.rb' in the rgl gem. You therefore get this error. Please try: ```ruby require 'rgl/adjacency' RGL ```