Commit f5874937 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: copy assignment, bool comparison for polynomialFunction

parent 087e963a
......@@ -230,6 +230,17 @@ Foam::polynomialFunction::integralMinus1(const scalar intConstant) const
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
bool Foam::polynomialFunction::operator==(const polynomialFunction& rhs) const
{
return
(
scalarList::operator==(static_cast<const scalarList&>(rhs))
&& logActive_ == rhs.logActive_
&& (!logActive_ || (logCoeff_ == rhs.logCoeff_))
);
}
Foam::polynomialFunction&
Foam::polynomialFunction::operator+=(const polynomialFunction& poly)
{
......
......@@ -108,9 +108,6 @@ class polynomialFunction
//- Check size is non-zero or trigger FatalErrot
void checkSize() const;
//- No copy assignment
void operator=(const polynomialFunction&) = delete;
public:
......@@ -190,6 +187,14 @@ public:
// Member Operators
//- Equality of coefficients, and logCoeff (if active)
bool operator==(const polynomialFunction& rhs) const;
bool operator!=(const polynomialFunction& rhs) const
{
return !operator==(rhs);
}
polynomialFunction& operator+=(const polynomialFunction&);
polynomialFunction& operator-=(const polynomialFunction&);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment