Giter VIP home page Giter VIP logo

Comments (5)

HarryMcCarney avatar HarryMcCarney commented on July 23, 2024 1

Hi Chris,

I have added Dijkstra shortest path calculation and some centrality measures to a fork of FGL here. I have also added tests and some inline documentation. Keen to issue a pull request to FGL if appropriate. Also happy to make any required changes and discuss broader plans for the library..

Hope its useful!

Harry

from fsharp.fgl.

LibraChris avatar LibraChris commented on July 23, 2024 1

Thank you for explaining. I am will add functions to recall edges independent from the order of parameters later this week.

from fsharp.fgl.

LibraChris avatar LibraChris commented on July 23, 2024

Hi,

this was not yet on the backlog, but I will put it on there. If you have any other ideas or improvements for FGL, please feel free to share them as I am happy to improve on this library.

from fsharp.fgl.

LibraChris avatar LibraChris commented on July 23, 2024

Hi,

Thank you very much for contributing to FGL. Everything looks good to me and a pull request would be more than welcome. I only have one question: You mentioned that the library does not support weighted undirected networks and the library would need a new version of the getEdge functions. Would you elaborate on this? I will happily add this functionality, but I do not understand the problem with the getEdge functions.

My intent for this library is twofold:

  1. FGL should have a functional graph data structure including classical graph-based algorithms implemented on top of this structure.
  2. FGL should be a place to implement classical generic graph structures including algorithms in pure F#

I am working on this site project, however, I plan to move it to FsLabs as soon as possible. Therefore, my rough roadmap is as follows:

  1. I will finish my work on CyJS.NET interactive and an interface for it in FGL. That it will become easy to see what is implemented.
  2. FGL and ArrayAdjacencyGraph will be combined into one project to reduce complexity and the library will be integrated into fslaborg.
  3. I will release a milestone issue this week covering the immediate plans to work on FGL, which everyone is welcome to make additions to.

I am always open to suggestions to improve FGL further and hope that you will continue to use this library.

Best regards

Christopher

from fsharp.fgl.

HarryMcCarney avatar HarryMcCarney commented on July 23, 2024

Hi Christopher,

Great, I am glad you are happy with it! I have tidied up the inline comments and submitted the pull request.

To clarify the issue regarding undirected graphs and TryGetEdge here is a snippet illustrating the point

#r "nuget: FSharp.FGL, 0.0.4"
#r "nuget: FSharp.FGL.ArrayAdjacencyGraph"

open FSharp.FGL
open FSharp.FGL.ArrayAdjacencyGraph

let vertices =
    [ for i=01 to 3 do (i,i) ]

let edges =
    [
        1,2,1.0
        2,3,1.0
    ]   

let graph = ArrayAdjacencyGraph(vertices,edges)

// returns Some 
graph.TryGetEdge (1,2) 
// returns None - in an undirected graph the order of params shouldnt matter. 
graph.TryGetEdge (2,1)  

I like your plan to bring CyJS and FGL together and happy to hear the interactive support is on the way. Myself and others at H&C are keen to continue contributing.

kind regards,

Harry

from fsharp.fgl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.