mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-05 17:35:55 +01:00
Function classes: default function replaced by nullptr
This commit is contained in:
parent
dc659991d0
commit
749818d9cc
@ -26,8 +26,6 @@ using namespace Latan;
|
||||
/******************************************************************************
|
||||
* DoubleFunction implementation *
|
||||
******************************************************************************/
|
||||
const DoubleFunction::vecFunc DoubleFunction::nullFunction_ = nullptr;
|
||||
|
||||
// constructor /////////////////////////////////////////////////////////////////
|
||||
DoubleFunction::DoubleFunction(const Index nArg, const vecFunc &f)
|
||||
: buffer_(new DVec)
|
||||
|
@ -39,7 +39,7 @@ private:
|
||||
public:
|
||||
// constructor
|
||||
explicit DoubleFunction(const Index nArg = 0,
|
||||
const vecFunc &f = nullFunction_);
|
||||
const vecFunc &f = nullptr);
|
||||
// destructor
|
||||
virtual ~DoubleFunction(void) = default;
|
||||
// access
|
||||
@ -59,7 +59,6 @@ private:
|
||||
private:
|
||||
std::shared_ptr<DVec> buffer_{nullptr};
|
||||
vecFunc f_;
|
||||
static const vecFunc nullFunction_;
|
||||
};
|
||||
|
||||
template <typename... Ts>
|
||||
|
@ -38,14 +38,14 @@ private:
|
||||
public:
|
||||
// constructor
|
||||
DoubleModel(const Index nArg = 0, const Index nPar = 0,
|
||||
const vecFunc &f = nullFunction_);
|
||||
const vecFunc &f = nullptr);
|
||||
// destructor
|
||||
virtual ~DoubleModel(void) = default;
|
||||
// access
|
||||
virtual Index getNArg(void) const;
|
||||
virtual Index getNPar(void) const;
|
||||
void setFunction(const Index nArg = 0, const Index nPar = 0,
|
||||
const vecFunc &f = nullFunction_);
|
||||
const vecFunc &f = nullptr);
|
||||
// function call
|
||||
double operator()(const DVec &data, const DVec &par) const;
|
||||
double operator()(const std::vector<double> &data,
|
||||
@ -59,7 +59,6 @@ private:
|
||||
private:
|
||||
std::shared_ptr<ModelSize> size_;
|
||||
vecFunc f_;
|
||||
static const vecFunc nullFunction_;
|
||||
};
|
||||
|
||||
END_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user