snap-stanford / snap

Stanford Network Analysis Platform (SNAP) is a general purpose network analysis and graph mining library.
Other
2.16k stars 797 forks source link

Get Neighbors implementation for Undirected and Directed Graphs with Tests #164

Open rohanbadlani opened 5 years ago

rohanbadlani commented 5 years ago

Throughout the usage of SNAP platform, there are many graph algorithms for which the user might need neighborhood data and hence adding that functionality as easy to use methods.

[Build] The build is passing.

[Testing] Tested the functionality and provides results as expected but will be writing rigorous tests.

I am not sure on where to add the documentation for this, but I have used comments in the codebase to make things quite clear and will be happy to help provide/edit documentation for this.

SUNet Id: rbadlani.

rohanbadlani commented 5 years ago

Adding in the implementation for directed graphs as well.

rohanbadlani commented 5 years ago

Added Tests in the tests/tests-TUNGraph.cpp and tests/tests-TNGraph.cpp that follow the same convention as all the other tests. These test basic functionality using a small test graph.

SUNet Id: rbadlani