aboutsummaryrefslogtreecommitdiffstats
path: root/methods/powell
diff options
context:
space:
mode:
authorastrojhgu <astrojhgu@gmail.com>2013-01-30 23:00:33 +0800
committerastrojhgu <astrojhgu@gmail.com>2013-01-30 23:00:33 +0800
commit844950c94bfa87132bef00a698c1ba485602a131 (patch)
treef722c7dcc31da70edca5b6d71c0ccf6bea3d2db9 /methods/powell
parentf181503af2c41daa1126062cd44cb4133e0c5d79 (diff)
downloadopt-utilities-844950c94bfa87132bef00a698c1ba485602a131.tar.bz2
0=>NULL_PTR
modified: methods/linmin/linmin.hpp modified: methods/powell/powell_method.hpp
Diffstat (limited to 'methods/powell')
-rw-r--r--methods/powell/powell_method.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/methods/powell/powell_method.hpp b/methods/powell/powell_method.hpp
index 7646e1d..381ffe1 100644
--- a/methods/powell/powell_method.hpp
+++ b/methods/powell/powell_method.hpp
@@ -54,7 +54,7 @@ namespace opt_utilities
private:
rT func(const pT& x)
{
- assert(p_fo!=0);
+ assert(p_fo!=NULL_PTR);
return p_fo->eval(x);
}
@@ -62,11 +62,11 @@ namespace opt_utilities
private:
void clear_xi()
{
- if(xi_1d!=0)
+ if(xi_1d!=NULL_PTR)
{
delete[] xi_1d;
}
- if(xi!=0)
+ if(xi!=NULL_PTR)
{
delete[] xi;
}
@@ -174,7 +174,7 @@ namespace opt_utilities
public:
powell_method()
- :threshold(1e-4),xi(0),xi_1d(0)
+ :threshold(1e-4),xi(NULL_PTR),xi_1d(NULL_PTR)
{}
virtual ~powell_method()
@@ -187,7 +187,7 @@ namespace opt_utilities
start_point(rhs.start_point),
end_point(rhs.end_point),
ncom(rhs.ncom),
- threshold(rhs.threshold),xi(0),xi_1d(0)
+ threshold(rhs.threshold),xi(NULL_PTR),xi_1d(NULL_PTR)
{
}