CSBiology / FSharp.FGL

Functional graph library for F#
https://csbiology.github.io/FSharp.FGL/
MIT License
61 stars 11 forks source link

Adding shortest path calculation and some centrality measures #52

Closed HarryMcCarney closed 1 year ago

HarryMcCarney commented 1 year ago

New functionality supporting the following:

Getting shortest path between two nodes (vertices). There are functions for undirected graphs, as well as directed, and directed and weighted graphs.

Additionally, there are functions for getting the mean shortest path for an entire graph and for a single vertex..

I have also added functions to return Closeness Centrality for a given vertex. There are versions for undirected graphs, as well as inward and outward centrality for directed graphs.

Lastly, I have added functions that return Neighborhood Connectivity for a given vertex in an undirected graph, and another function to the return the Clustering Coefficient.