简单最小化,但传递到方法中
我正在尝试使用 Solver Foundation 来解决一个简单的单变量最小化问题(C#),但我是这个库的新手,并且发现很难找到一个简单的示例...
我正在尝试使用变量最小化x:
MIN[const - method(x)],其中 method(x) 是在同一类中定义的方法。我还可以选择将 method(x) 替换为其他类的实例,其中包含“给定 x 的结果”类型方法。
有办法做到这一点吗?
多谢
I'm trying to use Solver Foundation to solve a simple one variable minimization problem (C#), but I'm new to this library and am finding an easy example hard to find...
What I'm trying to do minimize using variable x:
MIN[const - method(x)], where method(x) is a method defined in the same class. I also have the option of replacing method(x) with an instance of some other class, which has a 'result given x' type method in it.
Is there a way to do that?
Thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个很好的“简单”示例,我自己一直用它来学习求解器。经过 2-3 次阅读后,我能够理解所描述的问题,并且几乎了解求解器中发生的情况 =)
http://clear-lines.com/blog/post/first-steps-with-the-microsoft-solver-foundation.aspx
Here is a good "simple" example I've been using to learn Solver myself. After 2-3 readings I was able to wrap my head around the described problem and almost understand what was going on in solver =)
http://clear-lines.com/blog/post/first-steps-with-the-microsoft-solver-foundation.aspx