Coder Social home page Coder Social logo

Comments (3)

jmh530 avatar jmh530 commented on August 26, 2024

I think there is a lot of value in getting D's optimization routines in line with what is available in other languages. I am a fan of NLopt, but I don't think I have the knowledge to get it working in D.

from scid.

kyllingstad avatar kyllingstad commented on August 26, 2024

Sorry for not replying to this earlier!

It would indeed be very nice to have optimisation routines in SciD. And if there are several, it certainly makes sense for them to have the same API, so they are interchangeable. (I'm not sure to what extent that is possible, though. The API for a genetic algorithm is likely to be very different from that for a conjugate gradient algorithm, for example. But it may be possible to define some broad classes of algorithms.)

I'm not sold on the idea of using interfaces and classes like you do, though, because it makes the user pay the price of polymorphic types (indirect function calls, heap allocation, etc.) when polymorphism isn't actually used for anything. I'm a much bigger fan of Phobos-style static interfaces (cf. ranges, containers, RNGs, the upcoming allocators, etc.), which provide max power and performance with no limitations. (If you need polymorphism, it is always possible to create wrappers à la std.range.interfaces.)

from scid.

Laeeth avatar Laeeth commented on August 26, 2024

Nelson-Mead simplex is here, but license (requiring copyright notice display) may be a problem:
https://github.com/Laeeth/d_simplex.git

It works for me, but it's by no means rigorously tested.

It's hard to design an API from top down unless you already are intimately familiar with the nitty gritty of what each will require. It might be worth creating an experimental branch and starting to write implementations there, refine them, and then refactor out later.

Of course you can start by deciding to replicate everything another project does. But it would be a shame to let a grand goal detract from filling in functionality step by step. I am sure many people must have decent implementations squirreled away so if you start to show momentum maybe others will contribute.

from scid.

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.