Using boost::bind to bind member-function to boost::bisect?

前端 未结 2 1275
情深已故
情深已故 2021-01-25 06:12

I\'ve had problems with this before but now it\'s somehow working.

Now I\'ve following problem. I need to bind values into member-function before I call boost::bisect wi

2条回答
  •  星月不相逢
    2021-01-25 06:17

    This code:

    std::pair result = bisect(boost::bind(&CLASS::Function,this, _1), 0.0, 1.000000, TerminationCondition());
    

    is correct. The error you get means that what CLASS::Function returns is invalid. bisect is complaining about multiple roots (or possibly no roots) in the given interval [0; 1]. How does CLASS::Function look like?

提交回复
热议问题