Coder Social home page Coder Social logo

Comments (3)

HLWeil avatar HLWeil commented on July 18, 2024

The duplication of the submodule and function names is intended to make working with directed or undirected Graphs analogical. There would definitely be problems if both namespaces (directed and undirected) are opened but I trust the user to only open one and call functions of the other explicititly (if even needed). Requiring explicit names all the time would make working with the library way too clumsy IMO.
Regarding the duplicate implementation of Vertices.iter and Vertices.map: This could be done both ways. I'd say it's okay for those 2 functions to be duplicate to keep the general structure consistent. Do you agree? It's definitely debatable if not.

from fsharp.fgl.

WalternativE avatar WalternativE commented on July 18, 2024

The duplication of the submodule names in the directed and undirected modules is generally a good idea imho. I just don't know if functions that work generally on all graphs should be hard copied. An opiton to get rid of the copies to have private versions of the algorithms in the general module and use them for the directed/undirected submodules to offer an easy API. Do you see problems with that?

Would also make it easy to diverge for a couple of algorithms whenever the properties of an undirected or directed graph make it possible to optimize internally. It's kind of already done with the usage of a Map as the underlying datatype for the Graph type - it's further away from the original FGL implementation but afaik more performant. What do you think?

from fsharp.fgl.

HLWeil avatar HLWeil commented on July 18, 2024

I removed the code duplication you mentioned in d015d7f

With this I'll close this issue.

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.