aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--methods/linmin/linmin.hpp2
-rw-r--r--methods/powell/powell_method.hpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/methods/linmin/linmin.hpp b/methods/linmin/linmin.hpp
index ecfd0d6..fe5e58c 100644
--- a/methods/linmin/linmin.hpp
+++ b/methods/linmin/linmin.hpp
@@ -24,7 +24,7 @@ namespace opt_utilities
const func_obj<rT,pT>* pfoo;
func_adaptor(){}
func_adaptor(const func_adaptor&)
- :func_obj<rT,rT>(),p1(),xi1(),pfoo(0)
+ :func_obj<rT,rT>(),p1(),xi1(),pfoo(NULL_PTR)
{}
public:
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)
{
}