60#include <initializer_list>
69template<
int PolySize>
class Polynomial;
78 public VectorSpace<Polynomial<PolySize>, scalar, PolySize>
80 static_assert(PolySize > 0,
"Size must be positive (non-zero)");
108 Polynomial(std::initializer_list<scalar> coeffs);
111 explicit Polynomial(
const scalar coeffs[PolySize]);
137 scalar
value(
const scalar
x)
const;
143 scalar
integral(
const scalar x1,
const scalar x2)
const;
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Polynomial templated on size (order):
scalar logCoeff() const
Return the log coefficient.
Polynomial()
Default construct, with all coefficients = 0.
Polynomial< PolySize+1 > intPolyType
scalar value(const scalar x) const
Return polynomial value.
scalar derivative(const scalar x) const
Return derivative of the polynomial at the given x.
bool logActive() const
Return true if the log term is active.
scalar integral(const scalar x1, const scalar x2) const
Return integral between two values.
polyType integralMinus1(const scalar intConstant=0.0) const
Return integral coefficients when lowest order is -1.
Polynomial< PolySize > polyType
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A class for handling words, derived from Foam::string.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.