最优化方法课程里面的,照书上的方法编了一个程序。
#include
<
iostream
>
#include < cmath >
using namespace std;
const double delta = 0.00001 ;
// the function
double func( double x)
... {
return exp(x)+exp(-x);
}
int main()
#include < cmath >
using namespace std;
const double delta = 0.00001 ;
// the function
double func( double x)
... {
return exp(x)+exp(-x);
}
int main()