30 |
|
if (fabs(deltaF) <= relativeFTol) { |
31 |
|
|
32 |
|
if (bVerbose){ |
33 |
< |
cout << "function value tolerance test passed" << endl; |
33 |
> |
cout << "function value tolerance test passed" << std::endl; |
34 |
|
cout << "ftol = " << fTol |
35 |
< |
<< "\tdeltaf = " << deltaF<< endl; |
35 |
> |
<< "\tdeltaf = " << deltaF<< std::endl; |
36 |
|
} |
37 |
|
return CONVG_FTOL; |
38 |
|
} |
53 |
|
#endif |
54 |
|
|
55 |
|
if (gnorm <= relativeGTol) { |
56 |
< |
cout << "gradient tolerance test" << endl; |
56 |
> |
cout << "gradient tolerance test" << std::endl; |
57 |
|
cout << "gnorm = " << gnorm |
58 |
< |
<< "\trelativeGTol = " << relativeGTol<< endl; |
58 |
> |
<< "\trelativeGTol = " << relativeGTol<< std::endl; |
59 |
|
return CONVG_GTOL; |
60 |
|
} |
61 |
|
|
62 |
|
//absolute gradient tolerance test |
63 |
|
|
64 |
|
if (gnorm <= gTol) { |
65 |
< |
cout << "absolute gradient tolerance test" << endl; |
65 |
> |
cout << "absolute gradient tolerance test" << std::endl; |
66 |
|
cout << "gnorm = " << gnorm |
67 |
< |
<< "\tgTol = " << gTol<< endl; |
67 |
> |
<< "\tgTol = " << gTol<< std::endl; |
68 |
|
return CONVG_ABSGTOL; |
69 |
|
} |
70 |
|
|
76 |
|
double xnorm = Norm2(curX); |
77 |
|
double sTol = stepTol*max(1.0, xnorm); |
78 |
|
if (snorm <= sTol) { |
79 |
< |
cout << "step tolerance test passed" << endl; |
79 |
> |
cout << "step tolerance test passed" << std::endl; |
80 |
|
cout << "stol = " << sTol |
81 |
< |
<< "\tsnorm = " << snorm<< endl; |
81 |
> |
<< "\tsnorm = " << snorm<< std::endl; |
82 |
|
return CONVG_STEPTOL; |
83 |
|
} |
84 |
|
*/ |