Hack Forums
[C#] Rivers - A graphing library for .NET - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Rivers - A graphing library for .NET (/showthread.php?tid=5853921)



Rivers - A graphing library for .NET - Washi - Jun 25, 2018

Description :
Rivers is a light-weight graphing library written in C#. It contains a model for directed and undirected graphs, as well as a whole bunch of standard algorithms to analyse graphs. Rivers is released under the MIT license.

The project was inspired by networkx, a well known python module for graph analysis.

Screenshot :
[Image: eurCQLF.png]
Click to enlarge

Features:
  • Easy to use graph class modelled using adjacency lists for each node. This has the following advantages:
    • Optimised for quick insertion of nodes and edges.

    • Minimal memory footprint.

    • Efficient for sparse graphs.



  • Support for directed as well as undirected graphs. By default, graphs are directed.

  • Various built-in node traversal and search algorithms (including breadth first, depth first and more).

  • Built-in dominator analysis. Useful for control flow graph analysis.
    • Construct dominator trees from CFGs.

    • Get dominance frontier.



  • Dot file import/export support.



Download, tutorial and issue tracker:
https://github.com/Washi1337/Rivers

Cheers,


RE: Rivers - A graphing library for .NET - Hawk HF - Jun 25, 2018

HF is dead. Sad to see it go.
Great post nonetheless.


RE: Rivers - A graphing library for .NET - Closed User - Jun 26, 2018

Make graph's class disposable if it already isn't, and if it already is you should definitely use the fact its disposable.
Cool project nonetheless


RE: Rivers - A graphing library for .NET - Washi - Jun 26, 2018

(Jun 26, 2018 06:16 AM)Big Benim Wrote:  Make graph's class disposable if it already isn't, and if it already is you should definitely use the fact its disposable.
Cool project nonetheless

What would help implementing the IDisposable interface here? I am not allocating or using any unmanaged resources or something. The garbage collector takes care of all the allocation I might do.


RE: Rivers - A graphing library for .NET - Infirmary - Jun 26, 2018

How fast is the Rendering?
How much of a load does it take on memory..?!


RE: Rivers - A graphing library for .NET - Washi - Jun 26, 2018

(Jun 26, 2018 07:15 AM)Infirmary Wrote:  How fast is the Rendering?
How much of a load does it take on memory..?!

It doesn't do any of the rendering. If you look closely in the screenshot, it is a webbrowser navigated to the website http://webgraphviz.com/. It is merely there to show that it also supports importing and exporting using the dot file format. The purpose of this library is more for modelling and traversing graphs.

As for memory usage, I do not have the exact numbers, but since the library makes use of adjacency lists to store the edges, memory usage scales linearly with the number of edges and vertices (O(|V|+|E|), V being the vertices and E being the edges.).


RE: Rivers - A graphing library for .NET - Washi - Jul 5, 2018

So I added support for undirected graphs, as well as some graph generators that allow for easier generation of graphs. I hope to get multi graphs soon as well :)

https://github.com/Washi1337/Rivers

[Image: E4rdE8v.png]


RE: Rivers - A graphing library for .NET - Minto - Jul 8, 2018

Damn, this look's amazing, I'll be using it, thanks for the share!


RE: Rivers - A graphing library for .NET - SaketSaket - Jul 18, 2018

wow... it's amazing... will look into it as it will help me learn more...