Coder Social home page Coder Social logo

Comments (5)

btracey avatar btracey commented on July 21, 2024

This should have

type Bound struct{Min float64; Max float64}

and

type LinearConstraint struct{
    A *mat64.Dense
    b []float64
}

instead of the anonymous types.

from optimize.

btracey avatar btracey commented on July 21, 2024

This currently has a problem in that there is no way to communicate how many non-linear constraints there are. We could have a NumConstraints(), but that would be unfortunate. Maybe just mandate that Constraints has to allow nil arguments the first time.

from optimize.

hypoactiv avatar hypoactiv commented on July 21, 2024

I took an initial stab at this on my fork at https://github.com/hypoactiv/optimize today. Comments and criticism are welcome. A few notes on my changes:

  • I didn't yet do anything to update the testing system to the new style, so 'go test' won't run.
  • I removed the FunctionInfo struct that was originally being passed around, since it seemed redundant after introducing the Problem struct. Instead of using funcInfo.IsGradient, etc, I check if p.Grad != nil.
  • The Problem struct currently doesn't have any fields for constraints.

from optimize.

btracey avatar btracey commented on July 21, 2024

Would you mind making a pull request? Even if incomplete it's much easier to look at the diff.

from optimize.

hypoactiv avatar hypoactiv commented on July 21, 2024

Done. This is mostly to see if I understand what you and @vladimir-ch have in mind, but may also serve as a starting point for future modifications.

from optimize.

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.